Crate retina_fetch

Crate retina_fetch 

Source
Expand description

This API is modeled after the Fetch API

§References

Re-exports§

pub use mime;
pub use url;

Structs§

Fetch
This struct contains the Fetch object, which can be used to fetch resources using the internet. This object can be safely shared across components and threads.
FetchPromise
An async-library agnostic awaitable.
Request
The Request class.
Response
Represents the HTTP response to an request.
StatusCode
A convenient wrapper for the HTTP Status Code.
Url
A parsed URL record.

Enums§

Error
An error that can occur within the library or network stack.
InternalError
An error that occurred within the retina-fetch crate.
NetworkError
A network error occurred whilst processing the request/response.
RequestDestination
The Request Destination specifies what the destination of this fetch is.
RequestInitiator
The Request Initiator specifies which component started the request.
RequestMode
The request has an associated mode, which is an important concept in Cross Origin Resource Sharing.
RequestReferrer
Specifies the type of referrer a request should be associated with. Most requests have a specific origin, most likely a script or document, that initiated/linked the resource pointed to by this request. For example, a HTML document might have images (<img>), and those images should be requested from a server. To follow web security practices, a HTTP Referer header should be associated with the request.
StatusCodeClass
The class of the status code determine the result of the request and the semantics of the response.

Functions§

parse_page_url
Parse a page URL. This function is laxer than the regular Url::parse() parser, since the user can omit certain elements (like the scheme).

Type Aliases§

FetchResponse
This type specifies what the Fetch::fetch() API returns.