FLUTTER ECOSYSTEM

Zekfad/fetch_api

Fetch API bindings for Dart.

fetch_api project cover
Stars
5
Forks
5
Last push (UTC)
Apr 24, 2025
Project status
Active
Yaroslav Vorobev GitHub avatar
GITHUB User

Yaroslav Vorobev ↗

Bachelor of Software Engineering. Full-stack web and Dart/Flutter developer.

@ZeroNaNme & @ClownCoRussian Federation, Ryazan' Region, Skopin
LanguagesDart

Technical topics

Packages published by this repository

Dependencies used

Dependency list 4 items

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

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 of 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.