2.0.3 • Published 3 years ago

@ezraobiwale/http v2.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Http

A wrapper around axios

Installation

yarn add @ezraobiwale/http

or

<script src="https://cdn.jsdelivr.net/npm/@ezraobiwale/http@2.0.1/dist/http.js"></script>

Usage

  1. In node js app:
const Http = require('@ezraobiwale/http')

const http = new Http()
  1. In browser app:
const http = new window.Http()

Features

Supports all features of axios, with a few additional methods:

  • beforeResponse(fn): Accepts a function to call on all responses before resolving. The response can be tweaked here.
  • setHeader(key, value): Sets a header for all requests
  • removeHeader(key): Removes a previously header from all requests
  • setGlobalCatch(fn): Accepts a function to process all request errors
  • skipGlobalCatch(): Indicates that the global catch should not apply to the next request.
2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago