fetch_api 1.0.0-dev.5
fetch_api: ^1.0.0-dev.5 copied to clipboard
JavaScript bindings for Fetch API, allowing a flexible HTTP requests.
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());
}