fetch_api library
The Fetch API provides an interface for fetching resources
(including across the network). It will seem familiar to anyone who has used
XMLHttpRequest
, but the new API provides a more powerful and flexible
feature set.
Enums
- RequestCache
- The cache read-only property of the Request interface contains the cache mode of the request. It controls how the request will interact with the browser's HTTP cache.
- RequestCredentials
- Controls what browsers do with credentials (cookies, HTTP authentication entries, and TLS client certificates).
- RequestDuplex
- Request duplex mode.
- RequestMode
- Mode is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
- RequestRedirect
- Specifies how to handle a redirect response.
- RequestReferrerPolicy
- Specifies the referrer policy to use for the request.
- ResponseType
- The type of the response.
Extension Types
- AbortController
- The AbortController interface represents a controller object that allows you to abort one or more Web requests as and when desired.
- AbortSignal
- The AbortSignal interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.
- FetchOptions
- An object containing any custom options that you want to apply to the fetch request.
- Headers
- The Headers interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers.
- ReadableStream
- The ReadableStream interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
- ReadableStreamController
- Common interface for ReadableStream controllers.
- ReadableStreamDefaultController
- The ReadableStreamDefaultController interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
- ReadableStreamDefaultReader
- The ReadableStreamDefaultReader interface of the Streams API represents a default reader that can be used to read stream data supplied from a network (such as a fetch request).
- ReadableStreamDefaultReaderChunk
- Describes chunk from ReadableStreamDefaultReader.read.
- ReadableStreamSource
- An object containing methods and properties that define how the constructed stream instance will behave.
- Request
- The Request interface of the Fetch API represents a resource request.
- RequestBody
- Request.body union type.
- RequestInit
-
An object containing
options
for Request constructor. - RequestOptions
-
An object containing
options
for Request constructor. - Response
- The Response interface of the Fetch API represents the response to a request.
- ResponseBody
- Response.body union type.
- ResponseOptions
- An object containing any custom settings that you want to apply to the request.