// foo/bar/baz-123abc AssetPath("foo" :: "bar" :: Nil, "123abc", "baz")
Path of the requested asset
Whether the client supports gzip encoding or not
An AssetResponse is either AssetNotFound (if the asset has not been found on the server) or Found otherwise.
Concrete representation of an Endpoint
for routing purpose.
Concrete representation of an Endpoint
for routing purpose.
An endpoint from which we can get a Play request handler.
An endpoint from which we can get a Play request handler.
Asset content
Size, if known
Content type, if known
Whether data
contains the gzipped version of the asset
Query string encoding and decoding
Query string encoding and decoding
An HTTP request.
An HTTP request.
Has an instance of InvariantFunctor
.
Decodes a request entity
Decodes a request entity
Convenient type alias modeling the extraction of an A
information from request headers.
Convenient type alias modeling the extraction of an A
information from request headers.
This type has an instance of Applicative.
An attempt to extract an A
from a request headers.
An attempt to extract an A
from a request headers.
Models failure by returning a Left(result)
. That makes it possible
to early return an HTTP response if a header is wrong (e.g. if
an authentication information is missing)
Turns the A
information into a proper Play Result
Turns the A
information into a proper Play Result
Defines how to decode and encode path segments
Defines how to decode and encode path segments
Something that can be used as a Play request handler
Something that can be used as a Play request handler
The URL and HTTP headers of a request.
The URL and HTTP headers of a request.
Convenient constructor for building an asset from its name and path, without providing its digest.
Convenient constructor for building an asset from its name and path, without providing its digest.
Useful for reverse routing:
myAssetsEndpoint.call(asset("foo/bar", "baz"))
Asset path (no leading nor trailing slash)
Asset name
An AssetRequest
describing the asset. Throws an exception if
there is no digest for name
.
Convenient constructor for building an asset from its name, without providing its digest.
Convenient constructor for building an asset from its name, without providing its digest.
Useful for reverse routing:
myAssetsEndpoint.call(asset("baz"))
Asset name
An AssetRequest
describing the asset. There is no path prefixing the
name. Throws an exception if there is no digest for name
.
Decodes and encodes an AssetPath into a URL path.
An endpoint for serving assets.
An endpoint for serving assets.
URL description
An HTTP endpoint serving assets
Prefix to use to look up the resources in the classpath. You most probably never want to publish all your classpath resources.
A function that, given an AssetRequest, builds an AssetResponse by looking for the requested asset in the classpath resources.
Always succeeds in extracting no information from the headers
Always succeeds in extracting no information from the headers
A successful HTTP response (status code 200) with no entity
A successful HTTP response (status code 200) with no entity
A successful HTTP response (status code 200) with an HTML entity
A successful HTTP response (status code 200) with an HTML entity
Endpoint to redirect to
Arguments to pass to the endpoint to generate its URL
An HTTP response redirecting to another endpoint (using 303 code status).
Decodes a request that uses the POST HTTP verb.
Decodes a request that uses the POST HTTP verb.
Request URL
Request entity
Request headers
Builds a Play router out of endpoint definitions.
Builds a Play router out of endpoint definitions.
val routes = routesFromEndpoints( inc.implementedBy(x => x + 1) )
A successful HTTP response (status code 200) with string entity
A successful HTTP response (status code 200) with string entity
A response encoder that maps None
to an empty HTTP result with status 404
A response encoder that maps None
to an empty HTTP result with status 404
Interpreter for algebra.Assets that performs routing using Play framework