Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit315271c

Browse files
committed
docs: added docs for caching (closes#34)
1 parent829025e commit315271c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,16 @@ Upon being invoked, `Frisbee` returns an object with the following chainable met
237237
238238
* `path` **required** - the path for the HTTP request (e.g. `/v1/login`, will be prefixed with the value of `baseURI` if set)
239239
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>**
241241
242242
Here are a few examples (you can override/merge your set default headers as well per request):
243243
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+
244250
* To set a custom header value of `X-Reply-To` on a `POST` request:
245251
246252
```js

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp