From d68c4fdc9a4be4792496791fe7b3f4c02ade8d61 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 3 Sep 2024 03:38:41 +0200 Subject: [PATCH] docs: Explain withCredentials --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 304aaa9..da24b83 100644 --- a/README.md +++ b/README.md @@ -435,6 +435,7 @@ You can also pass all `fetch()` settings. | rejectCancelled | boolean | false | If `true` and request is set to `cancellable`, a cancelled requests' promise will be rejected. By default, instead of rejecting the promise, `defaultResponse` is returned. | | flattenResponse | boolean | false | Flatten nested response data, so you can avoid writing `response.data.data` and obtain response directly. Response is flattened when there is a "data" within response "data", and no other object properties set. | | defaultResponse | any | null | Default response when there is no data or when endpoint fails depending on the chosen `strategy` | +| withCredentials | boolean | false | Indicates whether credentials (such as cookies) should be included with the request. | | timeout | int | 30000 | You can set a request timeout for all requests or particular in milliseconds. | | onRequest | function(config) | | You can specify a function that will be triggered before the request is sent. The request configuration object will be sent as the first argument of the function. This is useful for modifying request parameters, headers, etc. | | onResponse | function(response) | | You can specify a function that will be triggered when the endpoint successfully responds. The full Response Object is sent as the first argument of the function. This is useful for handling the response data, parsing, and error handling based on status codes. |