You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -237,10 +237,16 @@ Upon being invoked, `Frisbee` returns an object with the following chainable met
237
237
238
238
* `path` **required** - the path for the HTTP request (e.g. `/v1/login`, will be prefixed with the value of `baseURI` if set)
239
239
240
-
* `options` _optional_ - an object containing options, such as header values, a request body, form data, or a querystring to send along with the request. For the `GET` method (and the `DELETE` method as of version `1.3.0`), `body` data will be encoded in the query string.
240
+
* `options` _optional_ - an object containing options, such as header values, a request body, form data, or a querystring to send along with the request. For the `GET` method (and the `DELETE` method as of version `1.3.0`), `body` data will be encoded in the query string. **This `options` object is passed to the native Fetch API method, which means you can use native Fetch API method options as well from here <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch>**
241
241
242
242
Here are a few examples (you can override/merge your set default headers as well per request):
243
243
244
+
* To turn off caching, pass `cache:'reload'` to native fetch options:
245
+
246
+
```js
247
+
const res = await api.get('/v1/messages', { cache:'reload' });
248
+
```
249
+
244
250
* To set a custom header value of `X-Reply-To` on a `POST` request: