// foo/bar/baz-123abc AssetPath("foo/bar", "baz")
As a client, we just need to give the path of the asset we are interested in, the web browser will
automatically set HTTP headers to handle gzip compression (Accept-Encoding
) and decompress the response.
As a client, we just need to give the path of the asset we are interested in, the web browser will
automatically set HTTP headers to handle gzip compression (Accept-Encoding
) and decompress the response.
As we request the asset via an XMLHttpRequest, we get its content as an
ArrayBuffer
As we request the asset via an XMLHttpRequest, we get its content as an
ArrayBuffer
A function that takes the information needed to build a request and returns a task yielding the information carried by the response.
A function that takes the information needed to build a request and returns a task yielding the information carried by the response.
Builds an URL path from an A
Builds an URL path from an A
Defines how to build a query string from an A
Defines how to build a query string from an A
Defines how to build a query string parameter value from an A
Defines how to build a query string parameter value from an A
A function that takes the information A
and returns an XMLHttpRequest
with an optional request entity.
A function that takes the information A
and returns an XMLHttpRequest
with an optional request entity. If provided, the request entity must be
compatible with the send
method of XMLHttpRequest.
A function that, given information A
and an XMLHttpRequest, returns
a request entity.
A function that, given information A
and an XMLHttpRequest, returns
a request entity.
Also, as a side-effect, the function can set the corresponding Content-Type header
on the given XMLHttpRequest.
A function that takes the information A
and the XMLHttpRequest
and sets up some headers on it.
A function that takes the information A
and the XMLHttpRequest
and sets up some headers on it.
Attempts to decode an A
from an XMLHttpRequest’s response
Attempts to decode an A
from an XMLHttpRequest’s response
A value that eventually yields an A
.
A value that eventually yields an A
.
Typically, concrete representation of Result
will have an instance of MonadError
, so
that we can perform requests (sequentially and in parallel) and recover errors.
Defines how to build a path segment from an A
Defines how to build a path segment from an A
Builds an URL from an A
Builds an URL from an A
Convenient constructor for building an AssetRequest from its path and name.
Convenient constructor for building an AssetRequest from its path and name.
myAssetsEndpoint(asset("foo/bar", "baz"))
Encodes an AssetPath as a request path.
An endpoint for requesting assets.
An endpoint for requesting assets.
If the server fails to find the requested asset, this endpoint returns a failed response.
URL description
An HTTP endpoint for requesting assets
Sets up no headers on the given XMLHttpRequest
Sets up no headers on the given XMLHttpRequest
Successfully decodes no information from a response
Successfully decodes no information from a response
Successfully decodes string information from a response
Successfully decodes string information from a response
Client that relies on the web browser to handle gzip compression