diff --git a/CHANGELOG.md b/CHANGELOG.md index 8902068..a76d0aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ + +# [2.9.0](https://github.com/elbywan/wretch/compare/2.8.1...2.9.0) (2024-06-01) + + +### :arrow_up: Version update(s) + +* Bump follow-redirects from 1.15.4 to 1.15.6 ([6204bec](https://github.com/elbywan/wretch/commit/6204bec)) +* Install firefox in the CI env ([c80ad35](https://github.com/elbywan/wretch/commit/c80ad35)) + +### :bug: Bug fix(es) + +* Do not jasonify FormData instances ([4693837](https://github.com/elbywan/wretch/commit/4693837)), closes [#231](https://github.com/elbywan/wretch/issues/231) + +### :factory: New feature(s) + +* Add BasicAuth addon ([ad5b591](https://github.com/elbywan/wretch/commit/ad5b591)) +* Omit null and undefined values from query string produced by QueryStringAddon ([6c7fcc7](https://github.com/elbywan/wretch/pull/230/commits/6c7fcc7)), closes [#229](https://github.com/elbywan/wretch/issues/229) + + ## [2.8.1](https://github.com/elbywan/wretch/compare/2.8.0...2.8.1) (2024-03-07) @@ -357,40 +376,7 @@ -# [2.0.0-next.1](https://github.com/elbywan/wretch/compare/2.0.0-next.0...2.0.0-next.1) (2022-07-08) - - -### :art: Code improvement(s) - -* Add editorconfig ([e81eaff](https://github.com/elbywan/wretch/commit/e81eaff)) - -### :fire: Breaking change(s) - -* Drop support on node < 14 ([1ff926c](https://github.com/elbywan/wretch/commit/1ff926c)) - -### :memo: Documentation update(s) - -* Additional improvements ([e79ff71](https://github.com/elbywan/wretch/commit/e79ff71)) -* Autogenerate API documentation and split it from the main README ([c710a71](https://github.com/elbywan/wretch/commit/c710a71)) -* Move svg asset and minor readme changes ([30de07c](https://github.com/elbywan/wretch/commit/30de07c)) -* Regenerate api doc ([7ae5b57](https://github.com/elbywan/wretch/commit/7ae5b57)) -* Small edits to the contributing file and renames scripts related t ([abec7f0](https://github.com/elbywan/wretch/commit/abec7f0)) -* Update bundle size ([1115d34](https://github.com/elbywan/wretch/commit/1115d34)) -* Update companion website ([d6bb842](https://github.com/elbywan/wretch/commit/d6bb842)) -* Update documentation ([15fd187](https://github.com/elbywan/wretch/commit/15fd187)) - -### :white_check_mark: Test improvement(s) - -* Fix resolvers test for node14 ([ca8b559](https://github.com/elbywan/wretch/commit/ca8b559)) -* Fix test on node 18 (with polyfilled fetch) ([d3b7b00](https://github.com/elbywan/wretch/commit/d3b7b00)) -* Replace restify with fastify for mock server ([9ee2cfc](https://github.com/elbywan/wretch/commit/9ee2cfc)) -* Run lint on CI ([9b819d3](https://github.com/elbywan/wretch/commit/9b819d3)) -* Test in multiple version of node in CI ([00d80a6](https://github.com/elbywan/wretch/commit/00d80a6)) - - - - -# [2.0.0-next.0](https://github.com/elbywan/wretch/compare/1.7.10...2.0.0-next.0) (2022-07-03) +# [2.0.0-next.1](https://github.com/elbywan/wretch/compare/1.7.10...2.0.0-next.1) (2022-07-08) ### :arrow_up: Version update(s) @@ -399,6 +385,7 @@ ### :art: Code improvement(s) +* Add editorconfig ([e81eaff](https://github.com/elbywan/wretch/commit/e81eaff)) * Improved packaging and bundling ([69c1e35](https://github.com/elbywan/wretch/commit/69c1e35)) ### :bug: Bug fix(es) @@ -418,15 +405,29 @@ * Add url arg and harmonize replace/mixin arguments ([8e4d0aa](https://github.com/elbywan/wretch/commit/8e4d0aa)) * Complete refactoring ([c2f5035](https://github.com/elbywan/wretch/commit/c2f5035)) +* Drop support on node < 14 ([1ff926c](https://github.com/elbywan/wretch/commit/1ff926c)) * Restore normal array behaviour for formdata and fix tests ([6879d48](https://github.com/elbywan/wretch/commit/6879d48)), closes [#119](https://github.com/elbywan/wretch/issues/119) ### :memo: Documentation update(s) +* Additional improvements ([e79ff71](https://github.com/elbywan/wretch/commit/e79ff71)) +* Autogenerate API documentation and split it from the main README ([c710a71](https://github.com/elbywan/wretch/commit/c710a71)) +* Move svg asset and minor readme changes ([30de07c](https://github.com/elbywan/wretch/commit/30de07c)) +* Regenerate api doc ([7ae5b57](https://github.com/elbywan/wretch/commit/7ae5b57)) +* Small edits to the contributing file and renames scripts related t ([abec7f0](https://github.com/elbywan/wretch/commit/abec7f0)) * Update browserstack badge. ([91cad34](https://github.com/elbywan/wretch/commit/91cad34)) +* Update bundle size ([1115d34](https://github.com/elbywan/wretch/commit/1115d34)) +* Update companion website ([d6bb842](https://github.com/elbywan/wretch/commit/d6bb842)) +* Update documentation ([15fd187](https://github.com/elbywan/wretch/commit/15fd187)) ### :white_check_mark: Test improvement(s) * Better tests coverage ([77e85dc](https://github.com/elbywan/wretch/commit/77e85dc)) +* Fix resolvers test for node14 ([ca8b559](https://github.com/elbywan/wretch/commit/ca8b559)) +* Fix test on node 18 (with polyfilled fetch) ([d3b7b00](https://github.com/elbywan/wretch/commit/d3b7b00)) +* Replace restify with fastify for mock server ([9ee2cfc](https://github.com/elbywan/wretch/commit/9ee2cfc)) +* Run lint on CI ([9b819d3](https://github.com/elbywan/wretch/commit/9b819d3)) +* Test in multiple version of node in CI ([00d80a6](https://github.com/elbywan/wretch/commit/00d80a6)) diff --git a/README.md b/README.md index 299c624..54675a0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@
-##### Wretch 2.8 is now live 🎉 ! Please have a look at the [releases](https://github.com/elbywan/wretch/releases) and the [changelog](https://github.com/elbywan/wretch/blob/master/CHANGELOG.md) after each update for new features and breaking changes. If you want to try out the hot stuff, please look into the [dev](https://github.com/elbywan/wretch/tree/dev) branch. +##### Wretch 2.9 is now live 🎉 ! Please have a look at the [releases](https://github.com/elbywan/wretch/releases) and the [changelog](https://github.com/elbywan/wretch/blob/master/CHANGELOG.md) after each update for new features and breaking changes. If you want to try out the hot stuff, please look into the [dev](https://github.com/elbywan/wretch/tree/dev) branch. ##### And if you like the library please consider becoming a [sponsor](https://github.com/sponsors/elbywan) ❤️. diff --git a/docs/api/assets/navigation.js b/docs/api/assets/navigation.js index 461cab9..2075e9c 100644 --- a/docs/api/assets/navigation.js +++ b/docs/api/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "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R++fijUmRM83/3z3IIPpPG/VBY6LHpLoP2RL90XsBNSR6SmySsDXmc1JoIRO8uHqMmzeHCAHYC3GSZBsSqNVhHFWPJgKn02EcbeeZQPQt8P95DeMjQg6nrWbfy1h76wS4nk3sForfyCI+6I8S5FoW4RPv5bG7WcSLa0hzB3d6xJVpFH8b2JW0exoAeKik8EfCUbw/p42EWKPIdRJKRg11DOKJsBaL5aEmA4sOZCE+XaaNhJ4F+OLr56HFeiaxTKCXX8yDY5DIx166UT/U5y96Ccb8OAYkPmHoGHDiyKF2f0tOaXvkcMfQljzGdgoe7qSWCxR+oJNSztepIyZ1F+2Z4CfJ9RXixLJHfzSkr8NlJa4l9IRIXowPS1wN8boSWUbCBYbwvEh2T58yscdGsmviDCI9PZKdp8wqtO3hyeJ6Dg6CZto8/QNPQMWdySUAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE6WY227bMAyG38W7bdf1sA7tXZeuwLAN3XrALoYhUGOlEarYnqx0DYa9+2ArdnQgJWq5bX5+FGmSovrjT6H5iy7OC1aWddUWe0XD9KI4L5Z1uZK8PTB/f73QS1nsFU+iKovzo71ithCyVLwqzn+MiIuHWukb3tbymaso6ZUvNdyTw7OT4zcnf/dc5HfF9WxBAI5CDPeetWJ2sdKLi840Tgy0GPSqVstLphmB6UtjyHsliURLiQG/cjVvCThHh8JU/ah429I+NaDGwN9WXK1vtRLVI+GsgBoDs646CEhHh8EeMorI1e4fRrBzehk50iSUVki2MopsiKW01cVxm/KgED0phvyVVUa+GjjtT7uUetODvlIw8LT/dZeZKSrN1ZzNfKQj9xy8PU0NzijViGPMks/ZSlpRz1fVTIs+HTZuo3NRp2Aax/5AUzkqSOnEBnwY+Zbr2mQl4JkpwR7A04JJOD6CkjC0M5qDQUBKAXIdhRkYqY7FbvGPzMzw75WMRn+vJDn4cN7BsXdMW7975B0xI/B+QqJh97+SgoYu9zBkw9tqY+F2qgmT8oHNnrZMvW4g3CD0gG/O3h2+PcoaH4aZMT6GGwFP4kZAyyO61wDZHMC+0W4DdMRmJMG6wNA8WBpSKvBNLEyFzfbtduspm0zpK1GV/CXMQf9nUtjBkVwEeIYTGGWu0w9K1QqK0AVa4iBAUsJcHJarLYp3ru7WDU/DRmkEVzd9FadhG2EE1dRyPRdSEmCjNFoUkSXI4NKLD/gtEQ7wESHYDW+bumr5ZMEE3F021FHH4JO6motHf2QblPktNaWNaqV4+UWUpeS/meIxnqtM0a+6aD6LJwQ5/pzipM5GP5FJsDfkbJQloLEu+ZwrxUvsArWxvpbmoa8xCt4R0tjXfiuH1GuoiTHeULox4KDZYYNwJsP+YfTeXI7FASwO1o+kK+OSl6uGf+Lrq81Z0shXkA32mDVaqN4TeMckTg++eQK91ce5w06UnRrAMO7p9kk02V48I9yDZOvMD+BbRNk3bJl3+NAG419XN1yrnNoMLYjssNGpPixLzFevz/oGoUWUTW8BT45RMyuSWIt3C1VrLUX1OGGzBZ9IznK6K2FO9VpXpehMdvAMIIjeP1bPTIqSaf7/7kEG0X/eqI8aEz1m1X3MluiP3guoIdFTZpPErTGf95UWMsOLr8e4ZX+JEICjECdJtiaBjA7jqG40ETiDDuNoN88EYmiB/wfdMj4g5HBqNLsuY2brBLiBTWoLxTeyhA/6owRZyxJ84l6e2s0SXnxDmju40xOubKP028CtpO3TAMBDJYU/Eg7S/TntJcQaRdZJKBkd1DNIJ8I5LJaHjgwcOpKF9HSZ9hJ6FuDFN8yDwQYmqUygyy/mwTPI5GMv3aQf6vMXXYIxP54BiU8YOhacOHKo3W/IOW2PXO4Y2pGn2F7Bw51kuEDhRzop536demJSd9GeCWGSfF8xTip79EdD/jl8VuZZYk+I7MOEsMzTENeVxDEyFhjC8yLbPX3KpB4b2a6JM4j09Mh2njOr0LaHJ4vvOToI+mnz8x9TFup/zycAAA==" \ No newline at end of file diff --git a/docs/api/assets/search.js b/docs/api/assets/search.js index df9c53a..e44ba61 100644 --- a/docs/api/assets/search.js +++ b/docs/api/assets/search.js @@ -1 +1 @@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HgVq7odsB3nmaTHfKMZzWhITWyrRSCVm9viz6Kuy1vztSZUGhFUmRQ8YdWFOx9J+el8Vw4VOmS327yLZR1/HZVZUiH8Iz8VdMpEGhJphGIN7VuVSAOu3D4+9G9iXzdvYqOsQt5kUlyPp/qmuW4YFz8MSSotbk7HwTYaEBziOvh0HHQ7RsUuk+0ZOXZ2R/UltcVJrHVEUX/FJlKIKohlfpSSKgmzhsVrajsDW5ooFB0joyqPcAGU0qH9IBwSw1NvKI3kIZGAwBuXGswSClkM7UI26GYtqXT3H4pCzuOqFolu9J/bQlmEksjG3NYEkZZoPt2H7OM6HkrzG0ukIM9FiK0gw/gpPHakVLPyHOmnUADCbq4WPXlw+4233iKPZAggxyYqFSJaiDYapg4aulGXOon9i7T6I/OAfmYKcSuS+90nUdEsiseYkjKVC3eIakRHLufSKG01fN3Xnw9FXd7XXNmJkcpMiiYnCHi5qB9ykERp4UXwWdJaiVlvxPlZPEYwZhY9MY2MotPxWNZfT9WXwWIqRiNpvC9M5Y1RIqedJ9JsfF/W3TXyOJx46yWJ7j8dC7d24SEkSX3ZO1vbEAFnzyoyW7XE9bVET0TIhdTWX3HBbe+1xh3Hw0GcipubmvHww2J2kw+ZNJzaVYu7XMGL9kC0LK93UrxdgG7SnvDBajI0JhfSBKnNbUjFxQ3VallOVjOCPreDTyRqieZ+J8GqRnjkdhCINDlRLfCECZqg8o7HkaYXopOvGileqQSWexQ5KqKTGfwJXj10u2WRuyYKpVGVoHKQd2SrNEWz9QTPrqnUP/cbM3h44bGRSIYf9K1ETilEWZBJ4BsptpagWCYdNtKETEiHFAMBdlspzmnDw8cUV5T++FEazY2C4aoKkx+QS2Orkd61t25fM2chgIkQyKXh3ygaTGhOVtpYSIAgHbwnWFsm4dFoYYYI4E0aiJv1Rp5fa+BsFHeWroLr5kOYOKedI2o2GO+3m7v9XXnYH8vNq6v337//P4VBWbCewwAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE81d23LcOJL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YMIHrfuJOnajutyKsbohIdzYXSv2A6BYoxwTMUblbpYmLdaKTHzhSuNTp9qXisoXoZPp/ChcQQUexTpSiUyh1rATML3mnVJou2CEFTrAiCYa/WwXFYfdIpXHh0dwAhgYEUAbiptZKscMJyGXqsBEXh4S2yCAQjh5V4j5meCibwhJWrtwCCclGAbOwQlsaqd820uv2Jn9uWa0gD6MDCftG0XBOg1XpciH1HKCD9wSmNpdGuEYL00UUPINV+Xgk7HIDsko6kAoCK7huPq4LZw3YJRI2GZ/OVw+bh3K72ZWrN5efvn//fzwuhkcEzgAA"; \ No newline at end of file diff --git a/docs/api/functions/addons_abort.default.html b/docs/api/functions/addons_abort.default.html index 6a0142b..8522bd6 100644 --- a/docs/api/functions/addons_abort.default.html +++ b/docs/api/functions/addons_abort.default.html @@ -5,4 +5,4 @@ polyfill.

import AbortAddon from "wretch/addons/abort"

const [c, w] = wretch("...")
.addon(AbortAddon())
.get()
.onAbort((_) => console.log("Aborted !"))
.controller();

w.text((_) => console.log("should never be called"));
c.abort();

// Or :

const controller = new AbortController();

wretch("...")
.addon(AbortAddon())
.signal(controller)
.get()
.onAbort((_) => console.log("Aborted !"))
.text((_) => console.log("should never be called"));

controller.abort();
-

Returns WretchAddon<AbortWretch, AbortResolver>

Generated using TypeDoc

\ No newline at end of file +

Returns WretchAddon<AbortWretch, AbortResolver>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/addons_perfs.default.html b/docs/api/functions/addons_perfs.default.html index 0676851..4d1527c 100644 --- a/docs/api/functions/addons_perfs.default.html +++ b/docs/api/functions/addons_perfs.default.html @@ -9,4 +9,4 @@

For node.js, there is a little extra work to do :

// Node.js only
const { performance, PerformanceObserver } = require("perf_hooks");

wretch.polyfills({
fetch: function (url, opts) {
performance.mark(url + " - begin");
return fetch(url, opts).then(res => {
performance.mark(url + " - end");
setTimeout(() => performance.measure(res.url, url + " - begin", url + " - end"), 0);
return res;
});
},
// other polyfills…
performance: performance,
PerformanceObserver: PerformanceObserver,
});
-

Returns WretchAddon<unknown, PerfsAddon>

Generated using TypeDoc

\ No newline at end of file +

Returns WretchAddon<unknown, PerfsAddon>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/addons_progress.default.html b/docs/api/functions/addons_progress.default.html index 8d6ce74..cb45ac8 100644 --- a/docs/api/functions/addons_progress.default.html +++ b/docs/api/functions/addons_progress.default.html @@ -2,4 +2,4 @@

Compatible with all platforms implementing the TransformStream WebAPI.

import ProgressAddon from "wretch/addons/progress"

wretch("some_url")
// Register the addon
.addon(ProgressAddon())
.get()
// Log the progress as a percentage of completion
.progress((loaded, total) => console.log(`${(loaded / total * 100).toFixed(0)}%`))
-

Returns WretchAddon<unknown, ProgressResolver>

Generated using TypeDoc

\ No newline at end of file +

Returns WretchAddon<unknown, ProgressResolver>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/index.default-1.html b/docs/api/functions/index.default-1.html index e751f22..4714f42 100644 --- a/docs/api/functions/index.default-1.html +++ b/docs/api/functions/index.default-1.html @@ -5,4 +5,4 @@

Parameters

Returns Wretch

A fresh wretch instance

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/middlewares_dedupe.dedupe.html b/docs/api/functions/middlewares_dedupe.dedupe.html index ce87975..8ac8bcd 100644 --- a/docs/api/functions/middlewares_dedupe.dedupe.html +++ b/docs/api/functions/middlewares_dedupe.dedupe.html @@ -18,4 +18,4 @@

This function is called when resolving the fetch response from duplicate calls. By default it clones the response to allow reading the body from multiple sources.

-

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/middlewares_delay.delay.html b/docs/api/functions/middlewares_delay.delay.html index 4b90ebe..043abd8 100644 --- a/docs/api/functions/middlewares_delay.delay.html +++ b/docs/api/functions/middlewares_delay.delay.html @@ -5,4 +5,4 @@

The request will be delayed by that amount of time.

-

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/middlewares_retry.retry.html b/docs/api/functions/middlewares_retry.retry.html index fc55c3f..c2dab80 100644 --- a/docs/api/functions/middlewares_retry.retry.html +++ b/docs/api/functions/middlewares_retry.retry.html @@ -5,4 +5,4 @@
import wretch from 'wretch'
import { retry } from 'wretch/middlewares'

wretch().middlewares([
retry({
// Options - defaults below
delayTimer: 500,
delayRamp: (delay, nbOfAttempts) => delay * nbOfAttempts,
maxAttempts: 10,
until: (response, error) => response && response.ok,
onRetry: null,
retryOnNetworkError: false,
resolveWithLatestResponse: false,
skip: undefined
})
])

// You can also return a Promise, which is useful if you want to inspect the body:
wretch().middlewares([
retry({
until: response =>
response.clone().json().then(body =>
body.field === 'something'
)
})
])
-

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns ConfiguredMiddleware

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/functions/middlewares_throttlingCache.throttlingCache.html b/docs/api/functions/middlewares_throttlingCache.throttlingCache.html index e0f8a97..ecad2f5 100644 --- a/docs/api/functions/middlewares_throttlingCache.throttlingCache.html +++ b/docs/api/functions/middlewares_throttlingCache.throttlingCache.html @@ -41,4 +41,4 @@

If set, a Response returned from the cache whill be flagged with a property name equal to this option.

-

Parameters

Returns ConfiguredMiddleware & {
    cache: Map<any, any>;
    inflight: Map<any, any>;
    throttling: Set<unknown>;
    cacheResponse(key, response) => void;
}

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns ConfiguredMiddleware & {
    cache: Map<any, any>;
    inflight: Map<any, any>;
    throttling: Set<unknown>;
    cacheResponse(key, response) => void;
}

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html index 2fa75cf..7d10f54 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -1,5 +1,6 @@ wretch

wretch

Index

Modules

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_abort.AbortResolver.html b/docs/api/interfaces/addons_abort.AbortResolver.html index df6bf8c..b27e8f1 100644 --- a/docs/api/interfaces/addons_abort.AbortResolver.html +++ b/docs/api/interfaces/addons_abort.AbortResolver.html @@ -1,14 +1,14 @@ -AbortResolver | wretch

Interface AbortResolver

Hierarchy

  • AbortResolver

Properties

controller +AbortResolver | wretch

Interface AbortResolver

Hierarchy

  • AbortResolver

Properties

controller: (<T, C, R>(this) => [any, AbortResolver])

Type declaration

    • <T, C, R>(this): [any, AbortResolver]
    • Returns the provided or generated AbortController plus the wretch response chain as a pair.

      // We need the controller outside the chain
      const [c, w] = wretch("url")
      .addon(AbortAddon())
      .get()
      .controller()

      // Resume with the chain
      w.onAbort(_ => console.log("ouch")).json()

      // Later on…
      c.abort()
      -

      Type Parameters

      Parameters

      Returns [any, AbortResolver]

onAbort: (<T, C, R>(this, cb) => AbortResolver)

Type declaration

setTimeout: (<T, C, R>(this, time, controller?) => AbortResolver)

Type declaration

onAbort: (<T, C, R>(this, cb) => AbortResolver)

Type declaration

setTimeout: (<T, C, R>(this, time, controller?) => AbortResolver)

Type declaration

    • <T, C, R>(this, time, controller?): AbortResolver
    • Aborts the request after a fixed time.

      If you use a custom AbortController associated with the request, pass it as the second argument.

      // 1 second timeout
      wretch("...").addon(AbortAddon()).get().setTimeout(1000).json(_ =>
      // will not be called if the request timeouts
      )

      Type Parameters

      Parameters

      • this: C & WretchResponseChain<T, C, R>
      • time: number

        Time in milliseconds

      • Optional controller: AbortController

        An instance of AbortController

        -

      Returns AbortResolver

Generated using TypeDoc

\ No newline at end of file +

Returns AbortResolver

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_abort.AbortWretch.html b/docs/api/interfaces/addons_abort.AbortWretch.html index 2e5df7f..cc28cab 100644 --- a/docs/api/interfaces/addons_abort.AbortWretch.html +++ b/docs/api/interfaces/addons_abort.AbortWretch.html @@ -1,8 +1,8 @@ -AbortWretch | wretch

Interface AbortWretch

Hierarchy

  • AbortWretch

Properties

signal +AbortWretch | wretch

Interface AbortWretch

Hierarchy

  • AbortWretch

Properties

Properties

signal: (<T, C, R>(this, controller) => AbortWretch)

Type declaration

    • <T, C, R>(this, controller): AbortWretch
    • Associates a custom controller with the request.

      Useful when you need to use your own AbortController, otherwise wretch will create a new controller itself.

      const controller = new AbortController()

      // Associates the same controller with multiple requests
      wretch("url1")
      .addon(AbortAddon())
      .signal(controller)
      .get()
      .json()
      wretch("url2")
      .addon(AbortAddon())
      .signal(controller)
      .get()
      .json()

      // Aborts both requests
      controller.abort()

      Type Parameters

      Parameters

      • this: T & Wretch<T, C, R>
      • controller: AbortController

        An instance of AbortController

        -

      Returns AbortWretch

Generated using TypeDoc

\ No newline at end of file +

Returns AbortWretch

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_basicAuth.BasicAuthAddon.html b/docs/api/interfaces/addons_basicAuth.BasicAuthAddon.html new file mode 100644 index 0000000..de0edc5 --- /dev/null +++ b/docs/api/interfaces/addons_basicAuth.BasicAuthAddon.html @@ -0,0 +1,6 @@ +BasicAuthAddon | wretch

Interface BasicAuthAddon

Hierarchy

  • BasicAuthAddon

Methods

Methods

  • Sets the Authorization header to Basic + . +Additionally, allows using URLs with credentials in them.

    +
    const user = "user"
    const pass = "pass"

    // Automatically sets the Authorization header to "Basic " + <base64 encoded credentials>
    wretch("...").addon(BasicAuthAddon).basicAuth(user, pass).get()

    // Allows using URLs with credentials in them
    wretch(`https://${user}:${pass}@...`).addon(BasicAuthAddon).get() +
    +

    Type Parameters

    Parameters

    • this: T & Wretch<T, C, R>
    • username: string
    • password: string

    Returns BasicAuthAddon

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_formData.FormDataAddon.html b/docs/api/interfaces/addons_formData.FormDataAddon.html index 2cbb7ec..1fc7cd0 100644 --- a/docs/api/interfaces/addons_formData.FormDataAddon.html +++ b/docs/api/interfaces/addons_formData.FormDataAddon.html @@ -1,4 +1,4 @@ -FormDataAddon | wretch

Interface FormDataAddon

Hierarchy

  • FormDataAddon

Methods

formData +FormDataAddon | wretch

Interface FormDataAddon

Hierarchy

  • FormDataAddon

Methods

Methods

  • Converts the javascript object to a FormData and sets the request body.

    const form = {
    hello: "world",
    duck: "Muscovy",
    };

    wretch("...").addons(FormDataAddon).formData(form).post();
    @@ -21,4 +21,4 @@

    Type Parameters

    Parameters

    • this: T & Wretch<T, C, R>
    • formObject: object

      An object which will be converted to a FormData

    • Optional recursive: boolean | string[]

      If true, will recurse through all nested objects. Can be set as an array of string to exclude specific keys.

      -

    Returns FormDataAddon

Generated using TypeDoc

\ No newline at end of file +

Returns FormDataAddon

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_formUrl.FormUrlAddon.html b/docs/api/interfaces/addons_formUrl.FormUrlAddon.html index 48a0de7..c3b85b0 100644 --- a/docs/api/interfaces/addons_formUrl.FormUrlAddon.html +++ b/docs/api/interfaces/addons_formUrl.FormUrlAddon.html @@ -1,8 +1,8 @@ -FormUrlAddon | wretch

Interface FormUrlAddon

Hierarchy

  • FormUrlAddon

Methods

formUrl +FormUrlAddon | wretch

Interface FormUrlAddon

Hierarchy

  • FormUrlAddon

Methods

Methods

  • Converts the input parameter to an url encoded string and sets the content-type header and body. If the input argument is already a string, skips the conversion part.

    const form = { a: 1, b: { c: 2 } };
    const alreadyEncodedForm = "a=1&b=%7B%22c%22%3A2%7D";

    // Automatically sets the content-type header to "application/x-www-form-urlencoded"
    wretch("...").addon(FormUrlAddon).formUrl(form).post();
    wretch("...").addon(FormUrlAddon).formUrl(alreadyEncodedForm).post();

    Type Parameters

    Parameters

    • this: T & Wretch<T, C, R>
    • input: string | object

      An object to convert into an url encoded string or an already encoded string

      -

    Returns FormUrlAddon

Generated using TypeDoc

\ No newline at end of file +

Returns FormUrlAddon

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_perfs.PerfsAddon.html b/docs/api/interfaces/addons_perfs.PerfsAddon.html index 4e4c70f..afab73e 100644 --- a/docs/api/interfaces/addons_perfs.PerfsAddon.html +++ b/docs/api/interfaces/addons_perfs.PerfsAddon.html @@ -1,4 +1,4 @@ -PerfsAddon | wretch

Interface PerfsAddon

Hierarchy

  • PerfsAddon

Properties

perfs +PerfsAddon | wretch

Interface PerfsAddon

Hierarchy

  • PerfsAddon

Properties

Properties

perfs: (<T, C, R>(this, cb?) => PerfsAddon)

Type declaration

    • <T, C, R>(this, cb?): PerfsAddon
    • Performs a callback on the API performance timings of the request.

      Warning: Still experimental on browsers and node.js

      -

      Type Parameters

      Parameters

      • this: C & WretchResponseChain<T, C, R>
      • Optional cb: ((timing) => void)
          • (timing): void
          • Parameters

            • timing: any

            Returns void

      Returns PerfsAddon

Generated using TypeDoc

\ No newline at end of file +

Type Parameters

Parameters

Returns PerfsAddon

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_progress.ProgressResolver.html b/docs/api/interfaces/addons_progress.ProgressResolver.html index 0f79d02..4e53589 100644 --- a/docs/api/interfaces/addons_progress.ProgressResolver.html +++ b/docs/api/interfaces/addons_progress.ProgressResolver.html @@ -1,8 +1,8 @@ -ProgressResolver | wretch

Interface ProgressResolver

Hierarchy

  • ProgressResolver

Properties

progress +ProgressResolver | wretch

Interface ProgressResolver

Hierarchy

  • ProgressResolver

Properties

Properties

progress: (<T, C, R>(this, onProgress) => ProgressResolver)

Type declaration

    • <T, C, R>(this, onProgress): ProgressResolver
    • Provides a way to register a callback to be invoked one or multiple times during the download. The callback receives the current progress as two arguments, the number of bytes loaded and the total number of bytes to load.

      Under the hood: this method adds a middleware to the chain that will intercept the response and replace the body with a new one that will emit the progress event.

      import ProgressAddon from "wretch/addons/progress"

      wretch("some_url")
      // Register the addon
      .addon(ProgressAddon())
      .get()
      // Log the progress as a percentage of completion
      .progress((loaded, total) => console.log(`${(loaded / total * 100).toFixed(0)}%`))

      Type Parameters

      Parameters

      • this: C & WretchResponseChain<T, C, R>
      • onProgress: ((loaded, total) => void)

        A callback that will be called one or multiple times with the number of bytes loaded and the total number of bytes to load.

        -
          • (loaded, total): void
          • Parameters

            • loaded: number
            • total: number

            Returns void

      Returns ProgressResolver

Generated using TypeDoc

\ No newline at end of file +
    • (loaded, total): void
    • Parameters

      • loaded: number
      • total: number

      Returns void

Returns ProgressResolver

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/addons_queryString.QueryStringAddon.html b/docs/api/interfaces/addons_queryString.QueryStringAddon.html index 0068aaa..1856e84 100644 --- a/docs/api/interfaces/addons_queryString.QueryStringAddon.html +++ b/docs/api/interfaces/addons_queryString.QueryStringAddon.html @@ -1,7 +1,8 @@ -QueryStringAddon | wretch

Hierarchy

  • QueryStringAddon

Methods

Methods

  • Converts a javascript object to query parameters, then appends this query string +QueryStringAddon | wretch

    Hierarchy

    • QueryStringAddon

    Methods

    Methods

    • Converts a javascript object to query parameters, then appends this query string to the current url. String values are used as the query string verbatim.

      -

      Pass true as the second argument to replace existing query parameters.

      +

      Pass true as the second argument to replace existing query parameters. +Pass true as the third argument to completely omit the key=value pair for undefined or null values.

      import QueryAddon from "wretch/addons/queryString"

      let w = wretch("http://example.com").addon(QueryStringAddon);
      // url is http://example.com
      w = w.query({ a: 1, b: 2 });
      // url is now http://example.com?a=1&b=2
      w = w.query({ c: 3, d: [4, 5] });
      // url is now http://example.com?a=1&b=2c=3&d=4&d=5
      w = w.query("five&six&seven=eight");
      // url is now http://example.com?a=1&b=2c=3&d=4&d=5&five&six&seven=eight
      w = w.query({ reset: true }, true);
      // url is now http://example.com?reset=true
      Note that .query is not meant to handle complex cases with nested objects.

      For this kind of usage, you can use wretch in conjunction with other libraries @@ -9,4 +10,4 @@

      // Using wretch with qs

      const queryObject = { some: { nested: "objects" } };
      const w = wretch("https://example.com/").addon(QueryStringAddon)

      // Use .qs inside .query :

      w.query(qs.stringify(queryObject));

      // Use .defer :

      const qsWretch = w.defer((w, url, { qsQuery, qsOptions }) => (
      qsQuery ? w.query(qs.stringify(qsQuery, qsOptions)) : w
      ));

      qsWretch
      .url("https://example.com/")
      .options({ qs: { query: queryObject } });

      Type Parameters

      Parameters

      • this: T & Wretch<T, C, R>
      • qp: string | object

        An object which will be converted, or a string which will be used verbatim.

        -
      • Optional replace: boolean

      Returns QueryStringAddon

    Generated using TypeDoc

    \ No newline at end of file +
  • Optional replace: boolean
  • Optional omitUndefinedOrNullValues: boolean

Returns QueryStringAddon

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/index.Wretch.html b/docs/api/interfaces/index.Wretch.html index 70fd7f7..d29c4aa 100644 --- a/docs/api/interfaces/index.Wretch.html +++ b/docs/api/interfaces/index.Wretch.html @@ -2,7 +2,7 @@
import wretch from "wretch"

// Reusable wretch instance
const w = wretch("https://domain.com", { mode: "cors" })

Immutability : almost every method of this class return a fresh Wretch object.

-

Type Parameters

Hierarchy

Body Types

Type Parameters

  • Self = unknown

  • Chain = unknown

  • Resolver = undefined

Hierarchy

  • Wretch

Body Types

HTTP

delete fetch @@ -30,52 +30,52 @@
wretch("...").body("hello").put();
// Note that calling put/post methods with a non-object argument is equivalent:
wretch("...").put("hello");

Parameters

  • this: Self & Wretch<Self, Chain, Resolver>
  • contents: any

    The body contents

    -

Returns Wretch<Self, Chain, Resolver>

  • Sets the "Content-Type" header, stringifies an object and sets the request body.

    +

Returns Wretch<Self, Chain, Resolver>

  • Sets the "Content-Type" header, stringifies an object and sets the request body.

    const jsonObject = { a: 1, b: 2, c: 3 };
    wretch("...").json(jsonObject).post();
    // Note that calling an 'http verb' method with an object argument is equivalent:
    wretch("...").post(jsonObject);

    Parameters

    • this: Self & Wretch<Self, Chain, Resolver>
    • jsObject: object

      An object which will be serialized into a JSON

    • Optional contentType: string

      A custom content type.

      -

    Returns Wretch<Self, Chain, Resolver>

HTTP

  • Performs a DELETE request.

    +

Returns Wretch<Self, Chain, Resolver>

HTTP

Returns Resolver extends undefined
    ? Chain & WretchResponseChain<Self, Chain, Resolver>
    : Resolver

Helpers

Helpers

Returns Wretch<Self, Chain, Resolver>

Returns W & Self & Wretch<Self & W, Chain & R, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Wretch<Self, Chain, Resolver>

Returns Self & Wretch<Self, Chain, ResolverReturn>

Generated using TypeDoc

\ No newline at end of file +

Returns Wretch<Self, Chain, Resolver>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/index.WretchError.html b/docs/api/interfaces/index.WretchError.html index cf1698e..28afd8e 100644 --- a/docs/api/interfaces/index.WretchError.html +++ b/docs/api/interfaces/index.WretchError.html @@ -1,5 +1,5 @@ WretchError | wretch

Interface WretchError

An Error enhanced with status, text and body.

-

Hierarchy

  • Error
    • WretchError

Properties

Hierarchy

  • Error
    • WretchError

Properties

Properties

json?: any
message: string
name: string
response: WretchResponse
stack?: string
status: number
text?: string
url: string

Generated using TypeDoc

\ No newline at end of file +

Properties

json?: any
message: string
name: string
response: WretchResponse
stack?: string
status: number
text?: string
url: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/interfaces/index.WretchResponseChain.html b/docs/api/interfaces/index.WretchResponseChain.html index 15f4c5f..0f52f3c 100644 --- a/docs/api/interfaces/index.WretchResponseChain.html +++ b/docs/api/interfaces/index.WretchResponseChain.html @@ -1,6 +1,6 @@ WretchResponseChain | wretch

Interface WretchResponseChain<T, Self, R>

The resolver interface to chaining catchers and extra methods after the request has been sent. Ultimately returns a Promise.

-

Type Parameters

  • T

  • Self = unknown

  • R = undefined

Hierarchy

  • WretchResponseChain

Catchers

Type Parameters

  • T

  • Self = unknown

  • R = undefined

Hierarchy

  • WretchResponseChain

Catchers

badRequest error fetchError forbidden @@ -17,45 +17,45 @@

Catchers

badRequest: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

error: ((this, code, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, code, cb): WretchResponseChain<T, Self, R>
    • Catches an http response with a specific error code or name and performs a callback.

      +
error: ((this, code, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, code, cb): WretchResponseChain<T, Self, R>
    • Catches an http response with a specific error code or name and performs a callback.

      The original request is passed along the error and can be used in order to perform an additional request.

      wretch("/resource")
      .get()
      .unauthorized(async (error, req) => {
      // Renew credentials
      const token = await wretch("/renewtoken").get().text();
      storeToken(token);
      // Replay the original request with new credentials
      return req.auth(token).get().unauthorized((err) => {
      throw err;
      }).json();
      })
      .json()
      // The promise chain is preserved as expected
      // ".then" will be performed on the result of the original request
      // or the replayed one (if a 401 error was thrown)
      .then(callback);
      -

      Parameters

      Returns WretchResponseChain<T, Self, R>

fetchError: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

fetchError: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

forbidden: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, cb): WretchResponseChain<T, Self, R>
    • Catches a forbidden request (http code 403) and performs a callback.

      +
forbidden: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

internalError: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, cb): WretchResponseChain<T, Self, R>
    • Catches an internal server error (http code 500) and performs a callback.

      +
internalError: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

notFound: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, cb): WretchResponseChain<T, Self, R>
    • Catches a "not found" request (http code 404) and performs a callback.

      +
notFound: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

timeout: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, cb): WretchResponseChain<T, Self, R>
    • Catches a timeout (http code 408) and performs a callback.

      +
timeout: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

unauthorized: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

    • (this, cb): WretchResponseChain<T, Self, R>
    • Catches an unauthorized request (http code 401) and performs a callback.

      +
unauthorized: ((this, cb) => WretchResponseChain<T, Self, R>)

Type declaration

Response Type

arrayBuffer: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as an ArrayBuffer object.

      +

Response Type

arrayBuffer: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as an ArrayBuffer object.

      wretch("...").get().arrayBuffer(arrayBuffer => …)
       
      -

      Type Parameters

      • Result = ArrayBuffer

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: ArrayBuffer

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

blob: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as a Blob.

      +

      Type Parameters

      • Result = ArrayBuffer

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: ArrayBuffer

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

blob: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as a Blob.

      wretch("...").get().blob(blob => …)
       
      -

      Type Parameters

      • Result = Blob

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: Blob

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

formData: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as a FormData object.

      +

      Type Parameters

      • Result = Blob

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: Blob

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

formData: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as a FormData object.

      wretch("...").get().formData(formData => …)
       
      -

      Type Parameters

      • Result = FormData

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: FormData

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

json: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as JSON.

      +

      Type Parameters

      • Result = FormData

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: FormData

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

json: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Read the payload and deserialize it as JSON.

      wretch("...").get().json((json) => console.log(Object.keys(json)));
       
      -

      Type Parameters

      • Result = unknown

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: any

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

res: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • The handler for the raw fetch Response. +

      Type Parameters

      • Result = unknown

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: any

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

res: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • The handler for the raw fetch Response. Check the MDN documentation for more details on the Response class.

      wretch("...").get().res((response) => console.log(response.url));
       
      -

      Type Parameters

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

text: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Retrieves the payload as a string.

      +

      Type Parameters

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

text: (<Result>(cb?) => Promise<Awaited<Result>>)

Type declaration

    • <Result>(cb?): Promise<Awaited<Result>>
    • Retrieves the payload as a string.

      wretch("...").get().text((txt) => console.log(txt));
       
      -

      Type Parameters

      • Result = string

      Parameters

      • Optional cb: ((type) => Result | Promise<Result>)
          • (type): Result | Promise<Result>
          • Parameters

            • type: string

            Returns Result | Promise<Result>

      Returns Promise<Awaited<Result>>

Generated using TypeDoc

\ No newline at end of file +

Type Parameters

Parameters

Returns Promise<Awaited<Result>>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons.html b/docs/api/modules/addons.html index 3aa91ff..2f30d5b 100644 --- a/docs/api/modules/addons.html +++ b/docs/api/modules/addons.html @@ -1,14 +1,16 @@ -addons | wretch

Module addons

References

AbortResolver +addons | wretch

Module addons

References

Re-exports AbortResolver
Re-exports AbortWretch
Re-exports FormDataAddon
Re-exports FormUrlAddon
Re-exports PerfsAddon
Re-exports ProgressResolver
Re-exports QueryStringAddon
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default

Generated using TypeDoc

\ No newline at end of file +

References

Re-exports AbortResolver
Re-exports AbortWretch
Re-exports BasicAuthAddon
Re-exports FormDataAddon
Re-exports FormUrlAddon
Re-exports PerfsAddon
Re-exports ProgressResolver
Re-exports QueryStringAddon
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Renames and re-exports default

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_abort.html b/docs/api/modules/addons_abort.html index e5ea74f..45a2702 100644 --- a/docs/api/modules/addons_abort.html +++ b/docs/api/modules/addons_abort.html @@ -1,4 +1,4 @@ -addons/abort | wretch

Module addons/abort

Index

Interfaces

AbortResolver +addons/abort | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_basicAuth.html b/docs/api/modules/addons_basicAuth.html new file mode 100644 index 0000000..20ca0ba --- /dev/null +++ b/docs/api/modules/addons_basicAuth.html @@ -0,0 +1,3 @@ +addons/basicAuth | wretch

Module addons/basicAuth

Index

Interfaces

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_formData.html b/docs/api/modules/addons_formData.html index 99b0fc9..d83852d 100644 --- a/docs/api/modules/addons_formData.html +++ b/docs/api/modules/addons_formData.html @@ -1,3 +1,3 @@ -addons/formData | wretch

Module addons/formData

Index

Interfaces

FormDataAddon +addons/formData | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_formUrl.html b/docs/api/modules/addons_formUrl.html index 4a4df83..e8f5483 100644 --- a/docs/api/modules/addons_formUrl.html +++ b/docs/api/modules/addons_formUrl.html @@ -1,3 +1,3 @@ -addons/formUrl | wretch

Module addons/formUrl

Index

Interfaces

FormUrlAddon +addons/formUrl | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_perfs.html b/docs/api/modules/addons_perfs.html index c23e6f1..7e89bf2 100644 --- a/docs/api/modules/addons_perfs.html +++ b/docs/api/modules/addons_perfs.html @@ -1,3 +1,4 @@ -addons/perfs | wretch

Module addons/perfs

Index

Interfaces

PerfsAddon +addons/perfs | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_progress.html b/docs/api/modules/addons_progress.html index b1f6374..b0f174d 100644 --- a/docs/api/modules/addons_progress.html +++ b/docs/api/modules/addons_progress.html @@ -1,3 +1,3 @@ -addons/progress | wretch

Module addons/progress

Index

Interfaces

ProgressResolver +addons/progress | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/addons_queryString.html b/docs/api/modules/addons_queryString.html index 40f0719..f909a94 100644 --- a/docs/api/modules/addons_queryString.html +++ b/docs/api/modules/addons_queryString.html @@ -1,3 +1,3 @@ -addons/queryString | wretch

Module addons/queryString

Index

Interfaces

QueryStringAddon +addons/queryString | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/index.default.html b/docs/api/modules/index.default.html index 80cfe93..cf464c1 100644 --- a/docs/api/modules/index.default.html +++ b/docs/api/modules/index.default.html @@ -1,6 +1,6 @@ -default | wretch

Namespace default

Index

Variables

WretchError +default | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/index.html b/docs/api/modules/index.html index c5db7ac..63834db 100644 --- a/docs/api/modules/index.html +++ b/docs/api/modules/index.html @@ -1,4 +1,4 @@ -index | wretch

Module index

Index

Namespaces

default +index | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/middlewares.html b/docs/api/modules/middlewares.html index a0262cd..f95464f 100644 --- a/docs/api/modules/middlewares.html +++ b/docs/api/modules/middlewares.html @@ -1,4 +1,4 @@ -middlewares | wretch

Module middlewares

References

DedupeKeyFunction +middlewares | wretch

Module middlewares

References

Re-exports DedupeKeyFunction
Re-exports DedupeMiddleware
Re-exports DedupeOptions
Re-exports DedupeResolverFunction
Re-exports DedupeSkipFunction
Re-exports DelayMiddleware
Re-exports DelayRampFunction
Re-exports OnRetryFunction
Re-exports OnRetryFunctionResponse
Re-exports RetryMiddleware
Re-exports RetryOptions
Re-exports SkipFunction
Re-exports ThrottlingCacheClearFunction
Re-exports ThrottlingCacheConditionFunction
Re-exports ThrottlingCacheInvalidateFunction
Re-exports ThrottlingCacheKeyFunction
Re-exports ThrottlingCacheMiddleware
Re-exports ThrottlingCacheOptions
Re-exports ThrottlingCacheSkipFunction
Re-exports UntilFunction
Re-exports dedupe
Re-exports delay
Re-exports retry
Re-exports throttlingCache

Generated using TypeDoc

\ No newline at end of file +

References

Re-exports DedupeKeyFunction
Re-exports DedupeMiddleware
Re-exports DedupeOptions
Re-exports DedupeResolverFunction
Re-exports DedupeSkipFunction
Re-exports DelayMiddleware
Re-exports DelayRampFunction
Re-exports OnRetryFunction
Re-exports OnRetryFunctionResponse
Re-exports RetryMiddleware
Re-exports RetryOptions
Re-exports SkipFunction
Re-exports ThrottlingCacheClearFunction
Re-exports ThrottlingCacheConditionFunction
Re-exports ThrottlingCacheInvalidateFunction
Re-exports ThrottlingCacheKeyFunction
Re-exports ThrottlingCacheMiddleware
Re-exports ThrottlingCacheOptions
Re-exports ThrottlingCacheSkipFunction
Re-exports UntilFunction
Re-exports dedupe
Re-exports delay
Re-exports retry
Re-exports throttlingCache

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/middlewares_dedupe.html b/docs/api/modules/middlewares_dedupe.html index 872d291..e7b090d 100644 --- a/docs/api/modules/middlewares_dedupe.html +++ b/docs/api/modules/middlewares_dedupe.html @@ -1,7 +1,7 @@ -middlewares/dedupe | wretch

Module middlewares/dedupe

Index

Type Aliases

DedupeKeyFunction +middlewares/dedupe | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/middlewares_delay.html b/docs/api/modules/middlewares_delay.html index 2d7fdb9..6a5d910 100644 --- a/docs/api/modules/middlewares_delay.html +++ b/docs/api/modules/middlewares_delay.html @@ -1,3 +1,3 @@ -middlewares/delay | wretch

Module middlewares/delay

Index

Type Aliases

DelayMiddleware +middlewares/delay | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/middlewares_retry.html b/docs/api/modules/middlewares_retry.html index cd77bee..8a3d624 100644 --- a/docs/api/modules/middlewares_retry.html +++ b/docs/api/modules/middlewares_retry.html @@ -1,4 +1,4 @@ -middlewares/retry | wretch

Module middlewares/retry

Index

Type Aliases

DelayRampFunction +middlewares/retry | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/modules/middlewares_throttlingCache.html b/docs/api/modules/middlewares_throttlingCache.html index a132a3a..9e062f8 100644 --- a/docs/api/modules/middlewares_throttlingCache.html +++ b/docs/api/modules/middlewares_throttlingCache.html @@ -1,4 +1,4 @@ -middlewares/throttlingCache | wretch

Module middlewares/throttlingCache

Index

Type Aliases

ThrottlingCacheClearFunction +middlewares/throttlingCache | wretch

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/types/addons_perfs.PerfCallback.html b/docs/api/types/addons_perfs.PerfCallback.html new file mode 100644 index 0000000..1b32113 --- /dev/null +++ b/docs/api/types/addons_perfs.PerfCallback.html @@ -0,0 +1 @@ +PerfCallback | wretch

Type alias PerfCallback

PerfCallback: ((timing) => void)

Type declaration

    • (timing): void
    • Parameters

      • timing: any

      Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/types/index.Config.html b/docs/api/types/index.Config.html index 62d9dab..e084b3a 100644 --- a/docs/api/types/index.Config.html +++ b/docs/api/types/index.Config.html @@ -1,2 +1,6 @@ -Config | wretch

Type alias Config

Config: {
    errorType: string;
    options: {};
    polyfills: {};
    polyfill(p, doThrow?, instance?, ...args) => any;
}

Configuration object.

-

Type declaration

  • errorType: string
  • options: {}
    • polyfills: {}
      • polyfill:function
        • Parameters

          • p: string
          • Optional doThrow: boolean
          • Optional instance: boolean
          • Rest ...args: any[]

          Returns any

      Generated using TypeDoc

      \ No newline at end of file +Config | wretch

      Type alias Config

      Config: {
          errorType: string;
          options: {};
          polyfills: {};
          polyfill(p, doThrow?) => {
              (input, init?): Promise<Response>;
              (input, init?): Promise<Response>;
          };
          polyfill(p, doThrow, instance, ...args) => FormData;
          polyfill(p, doThrow?, instance?) => {
              prototype: FormData;
              new (form?, submitter?): FormData;
          };
          polyfill(p, doThrow, instance, ...args) => URL;
          polyfill(p, doThrow?, instance?) => {
              prototype: URL;
              canParse(url, base?) => boolean;
              createObjectURL(obj) => string;
              revokeObjectURL(url) => void;
              new (url, base?): URL;
          };
          polyfill(p, doThrow, instance, ...args) => URLSearchParams;
          polyfill(p, doThrow?, instance?) => {
              prototype: URLSearchParams;
              new (init?): URLSearchParams;
          };
          polyfill(p, doThrow, instance, ...args) => AbortController;
          polyfill(p, doThrow?, instance?) => {
              prototype: AbortController;
              new (): AbortController;
          };
          polyfill(p, doThrow) => Performance;
          polyfill(p, doThrow?, instance?, ...args) => any;
      }

      Configuration object.

      +

      Type declaration

      • errorType: string
      • options: {}
        • polyfills: {}
          • polyfill:function
            • Parameters

              • p: "fetch"
              • Optional doThrow: boolean

              Returns {
                  (input, init?): Promise<Response>;
                  (input, init?): Promise<Response>;
              }

                • (input, init?): Promise<Response>
                • Parameters

                  • input: RequestInfo | URL
                  • Optional init: RequestInit

                  Returns Promise<Response>

                • (input, init?): Promise<Response>
                • Parameters

                  • input: RequestInfo
                  • Optional init: RequestInit

                  Returns Promise<Response>

            • Parameters

              • p: "FormData"
              • doThrow: boolean
              • instance: true
              • Rest ...args: [form?: HTMLFormElement, submitter?: HTMLElement]

              Returns FormData

            • Parameters

              • p: "FormData"
              • Optional doThrow: boolean
              • Optional instance: false

              Returns {
                  prototype: FormData;
                  new (form?, submitter?): FormData;
              }

                • new (form?, submitter?): FormData
                • Parameters

                  • Optional form: HTMLFormElement
                  • Optional submitter: HTMLElement

                  Returns FormData

              • prototype: FormData
            • Parameters

              • p: "URL"
              • doThrow: boolean
              • instance: true
              • Rest ...args: [url: string | URL, base?: string | URL]

              Returns URL

            • Parameters

              • p: "URL"
              • Optional doThrow: boolean
              • Optional instance: false

              Returns {
                  prototype: URL;
                  canParse(url, base?) => boolean;
                  createObjectURL(obj) => string;
                  revokeObjectURL(url) => void;
                  new (url, base?): URL;
              }

                • new (url, base?): URL
                • Parameters

                  • url: string | URL
                  • Optional base: string | URL

                  Returns URL

              • prototype: URL
              • canParse:function
                • Parameters

                  • url: string | URL
                  • Optional base: string

                  Returns boolean

              • createObjectURL:function
                • Parameters

                  • obj: Blob | MediaSource

                  Returns string

              • revokeObjectURL:function
                • Parameters

                  • url: string

                  Returns void

            • Parameters

              • p: "URLSearchParams"
              • doThrow: boolean
              • instance: true
              • Rest ...args: [init?: string | Record<string, string> | URLSearchParams | string[][]]

              Returns URLSearchParams

            • Parameters

              • p: "URLSearchParams"
              • Optional doThrow: boolean
              • Optional instance: false

              Returns {
                  prototype: URLSearchParams;
                  new (init?): URLSearchParams;
              }

                • new (init?): URLSearchParams
                • Parameters

                  • Optional init: string | Record<string, string> | URLSearchParams | string[][]

                  Returns URLSearchParams

              • prototype: URLSearchParams
            • Parameters

              • p: "AbortController"
              • doThrow: boolean
              • instance: true
              • Rest ...args: []

              Returns AbortController

            • Parameters

              • p: "AbortController"
              • Optional doThrow: boolean
              • Optional instance: false

              Returns {
                  prototype: AbortController;
                  new (): AbortController;
              }

                • new (): AbortController
                • Returns AbortController

              • prototype: AbortController
            • Parameters

              • p: "performance"
              • doThrow: boolean

              Returns Performance

            • Parameters

              • p: string
              • Optional doThrow: boolean
              • Optional instance: boolean
              • Rest ...args: any[]

              Returns any

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.ConfiguredMiddleware.html b/docs/api/types/index.ConfiguredMiddleware.html index 8b0e499..7c1e369 100644 --- a/docs/api/types/index.ConfiguredMiddleware.html +++ b/docs/api/types/index.ConfiguredMiddleware.html @@ -1,4 +1,4 @@ ConfiguredMiddleware | wretch

          Type alias ConfiguredMiddleware

          ConfiguredMiddleware: ((next) => FetchLike)

          Type declaration

            • (next): FetchLike
            • A ready to use middleware which is called before the request is sent. Input is the next middleware in the chain, then url and options. Output is a promise.

              -

              Parameters

              Returns FetchLike

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns FetchLike

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.FetchLike.html b/docs/api/types/index.FetchLike.html index 760e0cd..27a5d6b 100644 --- a/docs/api/types/index.FetchLike.html +++ b/docs/api/types/index.FetchLike.html @@ -1,2 +1,2 @@ FetchLike | wretch

          Type alias FetchLike

          FetchLike: ((url, opts) => Promise<WretchResponse>)

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns Promise<WretchResponse>

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.Middleware.html b/docs/api/types/index.Middleware.html index 9eed74e..f23de85 100644 --- a/docs/api/types/index.Middleware.html +++ b/docs/api/types/index.Middleware.html @@ -1,3 +1,3 @@ Middleware | wretch

          Type alias Middleware

          Middleware: ((options?) => ConfiguredMiddleware)

          Type declaration

            • (options?): ConfiguredMiddleware
            • Shape of a typical middleware. Expects options and returns a ConfiguredMiddleware that can then be registered using the .middlewares function.

              -

              Parameters

              • Optional options: {
                    [key: string]: any;
                }
                • [key: string]: any

              Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.WretchAddon.html b/docs/api/types/index.WretchAddon.html index 9643883..5d8ae79 100644 --- a/docs/api/types/index.WretchAddon.html +++ b/docs/api/types/index.WretchAddon.html @@ -1,2 +1,2 @@ WretchAddon | wretch

          Type alias WretchAddon<W, R>

          WretchAddon<W, R>: {
              resolver?: R | (<T, C>(_) => R);
              wretch?: W;
              beforeRequest?<T, C, R>(wretch, options, state) => T & Wretch<T, C, R>;
          }

          An addon enhancing either the request or response chain (or both).

          -

          Type Parameters

          • W extends unknown

          • R extends unknown = unknown

          Type declaration

          • Optional resolver?: R | (<T, C>(_) => R)
          • Optional wretch?: W
          • beforeRequest?:function

          Generated using TypeDoc

          \ No newline at end of file +

          Type Parameters

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.WretchDeferredCallback.html b/docs/api/types/index.WretchDeferredCallback.html index ad795cd..9570e2f 100644 --- a/docs/api/types/index.WretchDeferredCallback.html +++ b/docs/api/types/index.WretchDeferredCallback.html @@ -1,2 +1,2 @@ WretchDeferredCallback | wretch

          Type alias WretchDeferredCallback<T, C, R>

          WretchDeferredCallback<T, C, R>: ((wretch, url, options) => Wretch<T, C, any>)

          Type Parameters

          • T

          • C

          • R

          Type declaration

            • (wretch, url, options): Wretch<T, C, any>
            • Callback provided to the defer function allowing to chain deferred actions that will be stored and applied just before the request is sent.

              -

              Parameters

              Returns Wretch<T, C, any>

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns Wretch<T, C, any>

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.WretchErrorCallback.html b/docs/api/types/index.WretchErrorCallback.html index a52997b..b8a6400 100644 --- a/docs/api/types/index.WretchErrorCallback.html +++ b/docs/api/types/index.WretchErrorCallback.html @@ -1,2 +1,2 @@ WretchErrorCallback | wretch

          Type alias WretchErrorCallback<T, C, R>

          WretchErrorCallback<T, C, R>: ((error, originalRequest) => any)

          Type Parameters

          • T

          • C

          • R

          Type declaration

            • (error, originalRequest): any
            • Callback provided to catchers on error. Contains the original wretch instance used to perform the request.

              -

              Parameters

              Returns any

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns any

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.WretchOptions.html b/docs/api/types/index.WretchOptions.html index 730a8b7..4d8cd91 100644 --- a/docs/api/types/index.WretchOptions.html +++ b/docs/api/types/index.WretchOptions.html @@ -1,2 +1,2 @@ WretchOptions | wretch

          Type alias WretchOptions

          WretchOptions: Record<string, any>

          Fetch Request options with additional properties.

          -

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/index.WretchResponse.html b/docs/api/types/index.WretchResponse.html index 7526399..284b067 100644 --- a/docs/api/types/index.WretchResponse.html +++ b/docs/api/types/index.WretchResponse.html @@ -1,2 +1,2 @@ WretchResponse | wretch

          Type alias WretchResponse

          WretchResponse: Response & {
              [key: string]: any;
          }

          Fetch Response object with additional properties.

          -

          Type declaration

          • [key: string]: any

          Generated using TypeDoc

          \ No newline at end of file +

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_dedupe.DedupeKeyFunction.html b/docs/api/types/middlewares_dedupe.DedupeKeyFunction.html index 5bfe87d..4905567 100644 --- a/docs/api/types/middlewares_dedupe.DedupeKeyFunction.html +++ b/docs/api/types/middlewares_dedupe.DedupeKeyFunction.html @@ -1 +1 @@ -DedupeKeyFunction | wretch

          Type alias DedupeKeyFunction

          DedupeKeyFunction: ((url, opts) => string)

          Type declaration

            • (url, opts): string
            • Parameters

              Returns string

          Generated using TypeDoc

          \ No newline at end of file +DedupeKeyFunction | wretch

          Type alias DedupeKeyFunction

          DedupeKeyFunction: ((url, opts) => string)

          Type declaration

            • (url, opts): string
            • Parameters

              Returns string

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_dedupe.DedupeMiddleware.html b/docs/api/types/middlewares_dedupe.DedupeMiddleware.html index 429e591..c426f2f 100644 --- a/docs/api/types/middlewares_dedupe.DedupeMiddleware.html +++ b/docs/api/types/middlewares_dedupe.DedupeMiddleware.html @@ -18,4 +18,4 @@

          This function is called when resolving the fetch response from duplicate calls. By default it clones the response to allow reading the body from multiple sources.

          -

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_dedupe.DedupeOptions.html b/docs/api/types/middlewares_dedupe.DedupeOptions.html index 7543490..53c26d8 100644 --- a/docs/api/types/middlewares_dedupe.DedupeOptions.html +++ b/docs/api/types/middlewares_dedupe.DedupeOptions.html @@ -1 +1 @@ -DedupeOptions | wretch
          DedupeOptions: {
              key?: DedupeKeyFunction;
              resolver?: DedupeResolverFunction;
              skip?: DedupeSkipFunction;
          }

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file +DedupeOptions | wretch
          DedupeOptions: {
              key?: DedupeKeyFunction;
              resolver?: DedupeResolverFunction;
              skip?: DedupeSkipFunction;
          }

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_dedupe.DedupeResolverFunction.html b/docs/api/types/middlewares_dedupe.DedupeResolverFunction.html index c5fa211..a58f158 100644 --- a/docs/api/types/middlewares_dedupe.DedupeResolverFunction.html +++ b/docs/api/types/middlewares_dedupe.DedupeResolverFunction.html @@ -1 +1 @@ -DedupeResolverFunction | wretch

          Type alias DedupeResolverFunction

          DedupeResolverFunction: ((response) => Response)

          Type declaration

            • (response): Response
            • Parameters

              • response: Response

              Returns Response

          Generated using TypeDoc

          \ No newline at end of file +DedupeResolverFunction | wretch

          Type alias DedupeResolverFunction

          DedupeResolverFunction: ((response) => Response)

          Type declaration

            • (response): Response
            • Parameters

              • response: Response

              Returns Response

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_dedupe.DedupeSkipFunction.html b/docs/api/types/middlewares_dedupe.DedupeSkipFunction.html index 44f7b98..1087c5d 100644 --- a/docs/api/types/middlewares_dedupe.DedupeSkipFunction.html +++ b/docs/api/types/middlewares_dedupe.DedupeSkipFunction.html @@ -1 +1 @@ -DedupeSkipFunction | wretch

          Type alias DedupeSkipFunction

          DedupeSkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +DedupeSkipFunction | wretch

          Type alias DedupeSkipFunction

          DedupeSkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_delay.DelayMiddleware.html b/docs/api/types/middlewares_delay.DelayMiddleware.html index 0da8ced..fa8a58e 100644 --- a/docs/api/types/middlewares_delay.DelayMiddleware.html +++ b/docs/api/types/middlewares_delay.DelayMiddleware.html @@ -5,4 +5,4 @@

          The request will be delayed by that amount of time.

          -

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.DelayRampFunction.html b/docs/api/types/middlewares_retry.DelayRampFunction.html index 4f75a27..862d6ad 100644 --- a/docs/api/types/middlewares_retry.DelayRampFunction.html +++ b/docs/api/types/middlewares_retry.DelayRampFunction.html @@ -1 +1 @@ -DelayRampFunction | wretch

          Type alias DelayRampFunction

          DelayRampFunction: ((delay, nbOfAttempts) => number)

          Type declaration

            • (delay, nbOfAttempts): number
            • Parameters

              • delay: number
              • nbOfAttempts: number

              Returns number

          Generated using TypeDoc

          \ No newline at end of file +DelayRampFunction | wretch

          Type alias DelayRampFunction

          DelayRampFunction: ((delay, nbOfAttempts) => number)

          Type declaration

            • (delay, nbOfAttempts): number
            • Parameters

              • delay: number
              • nbOfAttempts: number

              Returns number

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.OnRetryFunction.html b/docs/api/types/middlewares_retry.OnRetryFunction.html index 3eff70b..dbedc56 100644 --- a/docs/api/types/middlewares_retry.OnRetryFunction.html +++ b/docs/api/types/middlewares_retry.OnRetryFunction.html @@ -1 +1 @@ -OnRetryFunction | wretch

          Type alias OnRetryFunction

          OnRetryFunction: ((args) => void | OnRetryFunctionResponse | Promise<OnRetryFunctionResponse>)

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file +OnRetryFunction | wretch

          Type alias OnRetryFunction

          OnRetryFunction: ((args) => void | OnRetryFunctionResponse | Promise<OnRetryFunctionResponse>)

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.OnRetryFunctionResponse.html b/docs/api/types/middlewares_retry.OnRetryFunctionResponse.html index b533706..c06e22f 100644 --- a/docs/api/types/middlewares_retry.OnRetryFunctionResponse.html +++ b/docs/api/types/middlewares_retry.OnRetryFunctionResponse.html @@ -1 +1 @@ -OnRetryFunctionResponse | wretch

          Type alias OnRetryFunctionResponse

          OnRetryFunctionResponse: {
              options?: WretchOptions;
              url?: string;
          } | undefined

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file +OnRetryFunctionResponse | wretch

          Type alias OnRetryFunctionResponse

          OnRetryFunctionResponse: {
              options?: WretchOptions;
              url?: string;
          } | undefined

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.RetryMiddleware.html b/docs/api/types/middlewares_retry.RetryMiddleware.html index aea1513..27f80d2 100644 --- a/docs/api/types/middlewares_retry.RetryMiddleware.html +++ b/docs/api/types/middlewares_retry.RetryMiddleware.html @@ -5,4 +5,4 @@
          import wretch from 'wretch'
          import { retry } from 'wretch/middlewares'

          wretch().middlewares([
          retry({
          // Options - defaults below
          delayTimer: 500,
          delayRamp: (delay, nbOfAttempts) => delay * nbOfAttempts,
          maxAttempts: 10,
          until: (response, error) => response && response.ok,
          onRetry: null,
          retryOnNetworkError: false,
          resolveWithLatestResponse: false,
          skip: undefined
          })
          ])

          // You can also return a Promise, which is useful if you want to inspect the body:
          wretch().middlewares([
          retry({
          until: response =>
          response.clone().json().then(body =>
          body.field === 'something'
          )
          })
          ])
          -

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns ConfiguredMiddleware

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.RetryOptions.html b/docs/api/types/middlewares_retry.RetryOptions.html index 138ab6a..d24bb7d 100644 --- a/docs/api/types/middlewares_retry.RetryOptions.html +++ b/docs/api/types/middlewares_retry.RetryOptions.html @@ -17,4 +17,4 @@

          Default: undefined

        • Optional until?: UntilFunction

          The request will be retried until that condition is satisfied.

          Default: response && response.ok

          -
        • Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.SkipFunction.html b/docs/api/types/middlewares_retry.SkipFunction.html index 45f3d4c..aa8cb6a 100644 --- a/docs/api/types/middlewares_retry.SkipFunction.html +++ b/docs/api/types/middlewares_retry.SkipFunction.html @@ -1 +1 @@ -SkipFunction | wretch
          SkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +SkipFunction | wretch
          SkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_retry.UntilFunction.html b/docs/api/types/middlewares_retry.UntilFunction.html index 2675966..884f2bf 100644 --- a/docs/api/types/middlewares_retry.UntilFunction.html +++ b/docs/api/types/middlewares_retry.UntilFunction.html @@ -1 +1 @@ -UntilFunction | wretch

          Type alias UntilFunction

          UntilFunction: ((response?, error?) => boolean | Promise<boolean>)

          Type declaration

            • (response?, error?): boolean | Promise<boolean>
            • Parameters

              • Optional response: Response
              • Optional error: Error

              Returns boolean | Promise<boolean>

          Generated using TypeDoc

          \ No newline at end of file +UntilFunction | wretch

          Type alias UntilFunction

          UntilFunction: ((response?, error?) => boolean | Promise<boolean>)

          Type declaration

            • (response?, error?): boolean | Promise<boolean>
            • Parameters

              • Optional response: Response
              • Optional error: Error

              Returns boolean | Promise<boolean>

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheClearFunction.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheClearFunction.html index 058ed3a..56589d1 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheClearFunction.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheClearFunction.html @@ -1 +1 @@ -ThrottlingCacheClearFunction | wretch
          ThrottlingCacheClearFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheClearFunction | wretch
          ThrottlingCacheClearFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheConditionFunction.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheConditionFunction.html index 30815b2..c62199e 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheConditionFunction.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheConditionFunction.html @@ -1 +1 @@ -ThrottlingCacheConditionFunction | wretch
          ThrottlingCacheConditionFunction: ((response) => boolean)

          Type declaration

            • (response): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheConditionFunction | wretch
          ThrottlingCacheConditionFunction: ((response) => boolean)

          Type declaration

            • (response): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheInvalidateFunction.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheInvalidateFunction.html index d48137a..a6df570 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheInvalidateFunction.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheInvalidateFunction.html @@ -1 +1 @@ -ThrottlingCacheInvalidateFunction | wretch

          Type alias ThrottlingCacheInvalidateFunction

          ThrottlingCacheInvalidateFunction: ((url, opts) => string | RegExp | void)

          Type declaration

            • (url, opts): string | RegExp | void
            • Parameters

              Returns string | RegExp | void

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheInvalidateFunction | wretch

          Type alias ThrottlingCacheInvalidateFunction

          ThrottlingCacheInvalidateFunction: ((url, opts) => string | RegExp | void)

          Type declaration

            • (url, opts): string | RegExp | void
            • Parameters

              Returns string | RegExp | void

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheKeyFunction.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheKeyFunction.html index 433c252..d8a8f5a 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheKeyFunction.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheKeyFunction.html @@ -1 +1 @@ -ThrottlingCacheKeyFunction | wretch
          ThrottlingCacheKeyFunction: ((url, opts) => string)

          Type declaration

            • (url, opts): string
            • Parameters

              Returns string

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheKeyFunction | wretch
          ThrottlingCacheKeyFunction: ((url, opts) => string)

          Type declaration

            • (url, opts): string
            • Parameters

              Returns string

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheMiddleware.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheMiddleware.html index 7470e4c..82deccb 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheMiddleware.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheMiddleware.html @@ -41,4 +41,4 @@

          If set, a Response returned from the cache whill be flagged with a property name equal to this option.

          -

          Parameters

          Returns ConfiguredMiddleware & {
              cache: Map<any, any>;
              inflight: Map<any, any>;
              throttling: Set<unknown>;
              cacheResponse(key, response) => void;
          }

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns ConfiguredMiddleware & {
              cache: Map<any, any>;
              inflight: Map<any, any>;
              throttling: Set<unknown>;
              cacheResponse(key, response) => void;
          }

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheOptions.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheOptions.html index a1c726b..67bbcb9 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheOptions.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheOptions.html @@ -1 +1 @@ -ThrottlingCacheOptions | wretch
          ThrottlingCacheOptions: {
              clear?: ThrottlingCacheClearFunction;
              condition?: ThrottlingCacheConditionFunction;
              flagResponseOnCacheHit?: string;
              invalidate?: ThrottlingCacheInvalidateFunction;
              key?: ThrottlingCacheKeyFunction;
              skip?: ThrottlingCacheSkipFunction;
              throttle?: number;
          }

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheOptions | wretch
          ThrottlingCacheOptions: {
              clear?: ThrottlingCacheClearFunction;
              condition?: ThrottlingCacheConditionFunction;
              flagResponseOnCacheHit?: string;
              invalidate?: ThrottlingCacheInvalidateFunction;
              key?: ThrottlingCacheKeyFunction;
              skip?: ThrottlingCacheSkipFunction;
              throttle?: number;
          }

          Type declaration

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheSkipFunction.html b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheSkipFunction.html index 612ecef..3af08b3 100644 --- a/docs/api/types/middlewares_throttlingCache.ThrottlingCacheSkipFunction.html +++ b/docs/api/types/middlewares_throttlingCache.ThrottlingCacheSkipFunction.html @@ -1 +1 @@ -ThrottlingCacheSkipFunction | wretch
          ThrottlingCacheSkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +ThrottlingCacheSkipFunction | wretch
          ThrottlingCacheSkipFunction: ((url, opts) => boolean)

          Type declaration

            • (url, opts): boolean
            • Parameters

              Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/addons_basicAuth.default.html b/docs/api/variables/addons_basicAuth.default.html new file mode 100644 index 0000000..8b98083 --- /dev/null +++ b/docs/api/variables/addons_basicAuth.default.html @@ -0,0 +1,4 @@ +default | wretch

          Variable defaultConst

          default: WretchAddon<BasicAuthAddon> = ...

          Adds the ability to use basic auth with the Authorization header.

          +
          import BasicAuthAddon from "wretch/addons/basicAuth"

          wretch().addon(BasicAuthAddon) +
          +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/addons_formData.default.html b/docs/api/variables/addons_formData.default.html index 707215c..4f0e8b4 100644 --- a/docs/api/variables/addons_formData.default.html +++ b/docs/api/variables/addons_formData.default.html @@ -1,4 +1,4 @@ default | wretch

          Variable defaultConst

          default: WretchAddon<FormDataAddon> = ...

          Adds the ability to convert a an object to a FormData and use it as a request body.

          import FormDataAddon from "wretch/addons/formData"

          wretch().addon(FormDataAddon)
          -

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/addons_formUrl.default.html b/docs/api/variables/addons_formUrl.default.html index a11bb4d..351955e 100644 --- a/docs/api/variables/addons_formUrl.default.html +++ b/docs/api/variables/addons_formUrl.default.html @@ -1,4 +1,4 @@ default | wretch

          Variable defaultConst

          default: WretchAddon<FormUrlAddon> = ...

          Adds the ability to convert a an object to a FormUrl and use it as a request body.

          import FormUrlAddon from "wretch/addons/formUrl"

          wretch().addon(FormUrlAddon)
          -

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/addons_queryString.default.html b/docs/api/variables/addons_queryString.default.html index d0e023d..0e3bcd6 100644 --- a/docs/api/variables/addons_queryString.default.html +++ b/docs/api/variables/addons_queryString.default.html @@ -1,4 +1,4 @@ default | wretch

          Variable defaultConst

          Adds the ability to append query parameters from a javascript object.

          import QueryAddon from "wretch/addons/queryString"

          wretch().addon(QueryAddon)
          -

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/index.default.WretchError.html b/docs/api/variables/index.default.WretchError.html index a9d20e5..79cea88 100644 --- a/docs/api/variables/index.default.WretchError.html +++ b/docs/api/variables/index.default.WretchError.html @@ -1 +1 @@ -WretchError | wretch

          Variable WretchError

          WretchError: typeof WretchError

          Generated using TypeDoc

          \ No newline at end of file +WretchError | wretch

          Variable WretchError

          WretchError: typeof WretchError

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/index.default.default.html b/docs/api/variables/index.default.default.html index ed751eb..38d5204 100644 --- a/docs/api/variables/index.default.default.html +++ b/docs/api/variables/index.default.default.html @@ -1 +1 @@ -default | wretch
          default: typeof default

          Generated using TypeDoc

          \ No newline at end of file +default | wretch
          default: typeof default

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/index.default.errorType.html b/docs/api/variables/index.default.errorType.html index ac0f96e..fdaf9ef 100644 --- a/docs/api/variables/index.default.errorType.html +++ b/docs/api/variables/index.default.errorType.html @@ -1,2 +1,2 @@ errorType | wretch

          Variable errorType

          errorType: ((errorType) => void)

          Type declaration

            • (errorType): void
            • {@inheritDoc setErrorType}

              -

              Parameters

              • errorType: string

              Returns void

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns void

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/index.default.options.html b/docs/api/variables/index.default.options.html index 6abda3d..b59492b 100644 --- a/docs/api/variables/index.default.options.html +++ b/docs/api/variables/index.default.options.html @@ -1,2 +1,2 @@ options | wretch
          options: ((options, replace?) => void)

          Type declaration

            • (options, replace?): void
            • {@inheritDoc setOptions}

              -

              Parameters

              • options: object
              • replace: boolean = false

              Returns void

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns void

          Generated using TypeDoc

          \ No newline at end of file diff --git a/docs/api/variables/index.default.polyfills.html b/docs/api/variables/index.default.polyfills.html index b289ce0..14f4bcf 100644 --- a/docs/api/variables/index.default.polyfills.html +++ b/docs/api/variables/index.default.polyfills.html @@ -1,2 +1,2 @@ polyfills | wretch

          Variable polyfills

          polyfills: ((polyfills, replace?) => void)

          Type declaration

            • (polyfills, replace?): void
            • {@inheritDoc setPolyfills}

              -

              Parameters

              • polyfills: object
              • replace: boolean = false

              Returns void

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns void

          Generated using TypeDoc

          \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index da58b7d..578ae98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wretch", - "version": "2.8.1", + "version": "2.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wretch", - "version": "2.8.1", + "version": "2.9.0", "license": "MIT", "devDependencies": { "@fastify/basic-auth": "^5.1.0", diff --git a/package.json b/package.json index 88b6ee5..5df072b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wretch", - "version": "2.8.1", + "version": "2.9.0", "type": "module", "description": "A tiny wrapper built around fetch with an intuitive syntax.", "keywords": [