stdweb 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.
ErrorOptions<T>
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".
FormDataEntryValue
FormDataEntryValueFile
FormDataEntryValueString
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.
JSON
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.

Functions

decodeURI(String encodedURI) String
The decodeURI() function decodes a Uniform Resource Identifier (URI) previously created by encodeURI() or a similar routine.
decodeURIComponent(String encodedURIComponent) String
Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
encodeURI(String uri) String
The encodeURI() function encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
encodeURIComponent(String uriComponent) String
The encodeURIComponent() function encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
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}) 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

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

Exceptions / Errors

Error<T extends Object?>
Runtime errors result in new Error objects being created and thrown.
URIError
The URIError object represents an error when a global URI handling function was used in a wrong way.