This package provides WASM-ready Dart bindings to JavaScript Fetch API.
- Full fetch options / request parameters coverage
- Cancel requests via
AbortController
. - Read response
- As text (
String
) - As
Blob
- As
Stream
ofUint8List
- As text (
- Response streaming
- Request streaming (check compatibility)
- Get access to redirect status
- Support non-
200
responses
fetch
and Request
have same options but different semantics, e.g. fetch
's
default mode is no-cors
while Request
's cors
. Therefore options objects
for fetch
function and Request
constructor made as different extension
types, although they are interchangeable and both inherited from RequestInit
.
For more info about that read MDN docs.