0.5.2 • Published 11 months ago
extra-response v0.5.2
extra-response
Utilities for Response.
Install
npm install --save extra-response
# or
yarn add extra-response
API
ok
ok(res: Response): Promise<Response>
If res.ok
is false
, it will throw HTTPError
.
toJSON
toJSON(res: Response): Promise<Json>
toText
toText(res: Response, charset?: string): Promise<string>
toLines
toLines(res: Response): AsyncIterable<string>
Only available on browser, because node-fetch
is not provide the WHATWG ReadableStream
as body.
toNDJSON
toNDJSON(res: Response): AsyncIterable<Json>
Only available on browser, because node-fetch
is not provide the WHATWG ReadableStream
as body.
0.5.2
11 months ago
0.5.0
1 year ago
0.4.1
1 year ago
0.5.1
1 year ago
0.3.12
1 year ago
0.4.0
1 year ago
0.3.11
2 years ago
0.3.10
2 years ago
0.3.9
2 years ago
0.3.8
2 years ago
0.3.7
3 years ago
0.3.6
3 years ago
0.3.5
3 years ago
0.3.4
3 years ago
0.3.3
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.3.0
3 years ago
0.2.15
3 years ago
0.2.14
3 years ago
0.2.13
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
3 years ago
0.2.9
3 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.8
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago