Skip to content

Commit c3e1ac7

Browse files
Update README.md with guidance for .option() usage
1 parent a217465 commit c3e1ac7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ You can pass in additional request headers, either individually or in a dictiona
247247

248248
````
249249

250+
## .option() and .options()
251+
You can pass in additional request options, either individually or in a dictionay. Options can be [node specific](https://github.com/bitinn/node-fetch#options) or [from fetch standard](https://fetch.spec.whatwg.org/#requestinit)
252+
```js
253+
.option("someOptionName", "someOptionValue")
254+
// or
255+
.options({"someOptionName":"someOptionValue"})
256+
```
257+
250258
### .responseType()
251259
To set a custom response type, use the `.responseType(<ResponseType>)` method. Refer [ResponseType.ts](./src/ResponseType.ts) for available options.
252260
````js

0 commit comments

Comments
 (0)