@trenskow/request

1.0.41 • Public • Published

@trenskow/request

A small request library for usage with APIs that uses the @trenskow/api-error package.

It is based of Axios.

Usage

const request = require('@trenskow/request');

await request('https://api.mysite.com', { /* options */ }).get('/my/resource', { /* options */});

Supported methods: get, post, put, delete and options.

Options

Name Type Description
headers Object Custom headers for the request(s).
payload Any Whatever Axios supports.
query Object Object with keys and values.

LICENSE

See LICENSE

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.41
    1
    • latest

Version History

Package Sidebar

Install

npm i @trenskow/request

Weekly Downloads

1

Version

1.0.41

License

BSD-2-Clause

Unpacked Size

9.39 kB

Total Files

6

Last publish

Collaborators

  • trenskow