extra-response
v0.6.0
Published
Utilities for Response
Readme
extra-response
Utilities for Response.
Install
npm install --save extra-response
# or
yarn add extra-responseAPI
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>Not available for node-fetch, because it is not provide the WHATWG ReadableStream as body.
toNDJSON
toNDJSON(res: Response): AsyncIterable<Json>Not available for node-fetch, because it is not provide the WHATWG ReadableStream as body.
