FLUTTER ECOSYSTEM

Zekfad/fetch_api

Dart 的 Fetch API 绑定。

fetch_api 项目封面
Stars
5
Forks
5
最近推送(UTC)
2025年4月24日
项目状态
未归档
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
语言Dart

技术话题

此仓库发布的插件

使用的依赖

依赖清单 4 项

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 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.