Adds a listener to an event type on fetch operations.
The type of event to listen to - only error
is supported.
The function that gets called when the event is fired.
Wrapper over fetch
to get some ArrayBuffer
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInitfetch options (passed directly to fetch()
)
the promise containing the ArrayBuffer
Wrapper over fetch
, then returns the blob of the response.
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInitfetch options (passed directly to fetch()
)
The response blob.
Wrapper over fetch()
.
Use this function instead of calling directly the Fetch API to benefit from automatic configuration from the HttpConfiguration module.
fires error
event On Network/HTTP error.
the fetch input
Optional
options: FetchOptionsfetch options (passed directly to fetch()
)
The response object.
Checks if listener is added to an event type.
The type of event to listen to - only error
is supported.
The function that gets called when the event is fired.
true
if the listener is added to this event type.
Wrapper over fetch
to get some JSON
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInitfetch options (passed directly to fetch()
)
the promise containing the JSON
Removes a listener from an event type on fetch operations.
The type of the listener that gets removed.
The listener function that gets removed.
Wrapper over fetch
to get some text
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInitfetch options (passed directly to fetch()
)
the promise containing the text
Downloads a remote image and converts it into a texture.
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInit & { Texture creation options and fetch options (passed directly to fetch()
)
the promise containing the texture
Wrapper over fetch
to get some XML.
fires error
event On Network/HTTP error.
the URL to fetch, or the resource request.
Optional
options: RequestInitfetch options (passed directly to fetch()
)
the promise containing the XML
Exposes an API to perform HTTP requests. This should be used instead of the Fetch API in order to benefit from some error-checking, automatic configuration (from the HttpConfiguration module), etc.