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

Platformweb

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

Fetch API #

Some methods are working only with Dart 3.0, see compatibility_layer library for more info.

This package provides JavaScript bindings to 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 is cors. Therefore options objects for this function and constructor made as different classes. For more info about that read MDN docs.

11
likes
130
points
122k
downloads

Publisher

verified publishernull.moe

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

ISC (license)

Dependencies

js

More

Packages that depend on fetch_api