readme: rename fetch cookieJar parameter to cookieJars
cookie: trim line
This commit is contained in:
parent
2b1c15c64b
commit
303185c9ff
|
@ -50,8 +50,8 @@ import {fetch, CookieJar} from "node-fetch-cookies";
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
### async fetch(cookieJar, url[, options])
|
### async fetch(cookieJars, url[, options])
|
||||||
- `cookieJar` A [CookieJar](#class-cookiejar) instance, an array of CookieJar instances or null, if you don't want to send or store cookies.
|
- `cookieJars` A [CookieJar](#class-cookiejar) instance, an array of CookieJar instances or null, if you don't want to send or store cookies.
|
||||||
- `url` and `options` as in https://github.com/bitinn/node-fetch#fetchurl-options
|
- `url` and `options` as in https://github.com/bitinn/node-fetch#fetchurl-options
|
||||||
|
|
||||||
Returns a Promise resolving to a [Response](https://github.com/bitinn/node-fetch#class-response) instance on success.
|
Returns a Promise resolving to a [Response](https://github.com/bitinn/node-fetch#class-response) instance on success.
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default class Cookie {
|
||||||
|
|
||||||
// check if url is valid
|
// check if url is valid
|
||||||
new url.URL(requestURL);
|
new url.URL(requestURL);
|
||||||
|
|
||||||
const splitted = str.split("; ");
|
const splitted = str.split("; ");
|
||||||
[this.name, this.value] = splitN(splitted[0], "=", 1);
|
[this.name, this.value] = splitN(splitted[0], "=", 1);
|
||||||
if(!this.name)
|
if(!this.name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user