fetch_api 1.0.1 fetch_api: ^1.0.1 copied to clipboard
JavaScript bindings for Fetch API, flexible HTTP requests, redirects, streaming and more.
example/fetch_api_example.dart
import 'package:fetch_api/fetch_api.dart';
void main() async {
// Simple cors request
final response = await fetch(
'https://api.restful-api.dev/objects/1',
FetchOptions(
mode: RequestMode.cors,
),
);
print(await response.text());
}