fetch
fetch copied to clipboard
A Fetch API wrapper
See https://twitter.com/lcasdev/status/1564598435772342272 - https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static - https://caniuse.com/mdn-api_response_json_static - https://github.com/WebKit/WebKit/commit/206817f17f39b6de35ea63268b74b750030d574f Here: https://github.com/tkrotoff/fetch/blob/v0.16.0/src/createHttpError.ts#L30-L34 ```TypeScript new Response(JSON.stringify(body), { status, statusText, headers: { 'content-type': jsonMimeType } }) ``` becomes ```TypeScript Response.json(body, { status, statusText })...
Implement upload progress example - https://www.reddit.com/r/reactjs/comments/rmhkw7/modern_api_datafetching_methods_in_react/hppzra5/ - https://stackoverflow.com/q/35711724 - https://developer.mozilla.org/en-US/docs/Web/API/Response/body - https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream