Skip to content

Commit aa5e781

Browse files
committed
Add functional headers to doc
1 parent ff5d5b8 commit aa5e781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Instead, it *returns* a new, connected component class, for you to use.
1313

1414
- `url` *(String)*: Required. HTTP URL from which to fetch the data.
1515
- `method` *(String)*: HTTP method. Defaults to `GET`.
16-
- `headers` *(Object)*: HTTP headers as simple key-value pairs. Does _not_ support the [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object format. The headers will be merged with the default ones. _After the merge_, any header with a falsy value will be discarded; for example, to remove the `Accept` header, set it to `false`. Defaults to `Accept` and `Content-Type` set to `application/json`.
16+
- `headers` *(Object)*: HTTP headers as simple key-value pairs, where the value is either a String or function evaluated when mappings are calculated. Does _not_ support the [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object format. The headers will be merged with the default ones. _After the merge_, any header with a falsy value will be discarded; for example, to remove the `Accept` header, set it to `false`. Defaults to `Accept` and `Content-Type` set to `application/json`.
1717
- `credentials` *(String)*: Policy for credential to include with request. One of `omit`, `same-origin`, `include`. See [`Request.credentials`](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials) for details. Defaults to `same-origin`.
1818
- `body`: Any body that you want to add to your request; however, it must be replayable (i.e. not a one time use stream). Note that a request using the `GET` or `HEAD` method cannot have a body.
1919
- `redirect` *(String)*: The redirect mode to use: `follow`, `error`, or `manual`. See [`Request.redirect`](https://developer.mozilla.org/en-US/docs/Web/API/Request/redirect) for details. Defaults to `follow`.

0 commit comments

Comments
 (0)