2.0.0 • Published 5 months ago

fetch-ext v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

fetch() extension

Extension of native fetch with:

  • Retryable requests
  • Request timeout
  • Standalone HTTP utilities

ci status

options.extension

  • timeout number | string

    Request timeout

  • retry Object

  • json any

    Shortcut for sending JSON serialized data. Equivalent to:

    {
        headers: {
            'content-type': 'application/json',
            'accept':  'application/json',
        },
        body: JSON.stringify(value),
    }

response.extension

  • body()

    Infer and execute body parser based on content-type

2.0.0

5 months ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago