webfetch library

Classes

Blob
A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
Client
File
Provides information about files and allows JavaScript in a web page to access their content.
FormData
Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
Headers
This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
Request
This Fetch API interface represents a resource request.
Response
This Fetch API interface represents the response to a request.
URL
Uniform Resource Locator (URL) is a text string that specifies where a resource (such as a web page, image, or video) can be found on the Internet.
URLSearchParams
The URLSearchParams interface defines utility methods to work with the query string of a URL.

Enums

EndingType
ReferrerPolicy
The Referrer-Policy HTTP header controls how much referrer information (sent with the Referer header) should be included with requests. Aside from the HTTP header, you can set this policy in HTML.
RequestCache
MDN reference
RequestCredentials
The credentials read-only property of the Request interface indicates whether the user agent should send or receive cookies from the other domain in the case of cross-origin requests.
RequestDestination
The destination read-only property of the Request interface returns a string describing the type of content being requested.
RequestMode
The mode read-only property of the Request interface contains the mode of the request (e.g., cors, no-cors, same-origin, navigate or websocket.) This is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
RequestRedirect
The redirect read-only property of the Request interface contains the mode for how redirects are handled.
ResponseType
The type read-only property of the Response interface contains the type of the response.

Extensions

Fetch$Client on Fetch
HttpStatusReasonPhrase on int
HTTP status code reason phrases.

Functions

fetch(Object resource, {String? method, Object? headers, Object? body, RequestMode? mode, RequestCredentials? credentials, RequestCache? cache, RequestRedirect? redirect, String? referrer, ReferrerPolicy? referrerPolicy, String? integrity, bool? keepalive, RequestDestination? destination}) Future<Response>
The fetch() method starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.

Typedefs

ArrayBuffer = ByteBuffer
Fetch = Future<Response> Function(Object resource, {Object? body, RequestCache? cache, RequestCredentials? credentials, RequestDestination? destination, Object? headers, String? integrity, bool? keepalive, String? method, RequestMode? mode, RequestRedirect? redirect, String? referrer, ReferrerPolicy? referrerPolicy})