@mondopower/fetch
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

This package represents an http client library to perform http requests with interceptors, redaction etc.

Usage

const client = new FetchClient({authorizationToken, baseUrl}) const result = await client.get('urlpath')

If an error occurred the result will contain an isErrored = true and an error property including a type and a message if (result.isErrored) console.log(result.error.errorType, result.error.message)

otherwise the result will contain the data property

console.log(result.data)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    2
  • 1.1.551
    2

Package Sidebar

Install

npm i @mondopower/fetch

Weekly Downloads

4

Version

1.2.0

License

Apache-2.0

Unpacked Size

41.3 kB

Total Files

9

Last publish

Collaborators

  • daryl-miller
  • mondo-ci