webfetch 0.0.5 copy "webfetch: ^0.0.5" to clipboard
webfetch: ^0.0.5 copied to clipboard

A Dart implementation of the Web Fetch API that allows you to make requests and process results just like using fetch in a browser.

example/main.dart

import 'package:webfetch/webfetch.dart';

void main() async {
  final formData = FormData();
  formData.append('name', 'John Doe');
  formData.append('age', '42');

  final blob = Blob(['Hello, World!'], type: 'text/plain');
  formData.append('file', blob, 'hello.txt');

  final response = await fetch(
    'https://webhook.site/34d4401b-3c1e-4941-be2c-9a9c17cf9afe?',
    method: "POST",
    body: formData,
    keepalive: true,
  );

  print(await response.text());
}
3
likes
0
points
1.08k
downloads

Publisher

verified publisherodroe.com

Weekly Downloads

A Dart implementation of the Web Fetch API that allows you to make requests and process results just like using fetch in a browser.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, mime

More

Packages that depend on webfetch