fetch_api 2.2.0 copy "fetch_api: ^2.2.0" to clipboard
fetch_api: ^2.2.0 copied to clipboard

Platformweb

JavaScript bindings for Fetch API, flexible HTTP requests, redirects, streaming and more.

Fetch API #

pub package package publisher

This package provides WASM-ready Dart bindings to JavaScript Fetch API.

Features #

  • Full fetch options / request parameters coverage
  • Cancel requests via AbortController.
  • Read response
    • As text (String)
    • As Blob
    • As Stream of Uint8List
  • Response streaming
  • Request streaming (check compatibility)
  • Get access to redirect status
  • Support non-200 responses

Some notes about fetch and Request #

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.

10
likes
140
points
81.9k
downloads

Publisher

verified publishernull.moe

Weekly Downloads

JavaScript bindings for Fetch API, flexible HTTP requests, redirects, streaming and more.

Repository (GitHub)
View/report issues

Topics

#web #fetch

Documentation

API reference

License

ISC (license)

Dependencies

web

More

Packages that depend on fetch_api