The Ring requests that the handlers of podcast-clj answer and the responses they give: the bodies, credentials, hosts and conditions of the requests.
The Ring requests that the handlers of podcast-clj answer and the responses they give: the bodies, credentials, hosts and conditions of the requests.
(addressed-to? request names)Whether the Host header of the Ring request names the machine itself
or one of the host names, with or without a port.
A request without a Host header is too, as HTTP/1.0 allows, since the check is against web pages, and a client that isn't a browser can send any name.
Whether the Host header of the Ring `request` names the machine itself or one of the host `names`, with or without a port. A request without a Host header is too, as HTTP/1.0 allows, since the check is against web pages, and a client that isn't a browser can send any name.
(body-bytes body max-bytes)The bytes of the body of a Ring request, which is a string, bytes, a
stream or nothing. Nil when the body holds more than max-bytes, and
for a stream in ClojureScript.
The bytes of the `body` of a Ring request, which is a string, bytes, a stream or nothing. Nil when the body holds more than `max-bytes`, and for a stream in ClojureScript.
(body-text body max-bytes)The text of the body of a Ring request, read within max-bytes, of
UTF-8.
The text of the `body` of a Ring request, read within `max-bytes`, of UTF-8.
(credentials authorization)The credentials in the Authorization header authorization, as a map,
or nil when it has none.
The map has :username and :password for basic authentication, or :token for a bearer token, as http/authorization takes them, and the password and the token are hidden texts. The header can be a hidden text too.
The credentials in the Authorization header `authorization`, as a map, or nil when it has none. The map has :username and :password for basic authentication, or :token for a bearer token, as http/authorization takes them, and the password and the token are hidden texts. The header can be a hidden text too.
(host-name host)The host of a Host header or of a server name, in lower case and
without its port.
The `host` of a Host header or of a server name, in lower case and without its port.
(https? {:keys [scheme headers] :as request})Whether the Ring request came over https: by its scheme, or by the
X-Forwarded-Proto of a proxy in front, e.g. Caddy.
Whether the Ring `request` came over https: by its scheme, or by the X-Forwarded-Proto of a proxy in front, e.g. Caddy.
The names of the machine itself that a Host header can give.
The names of the machine itself that a Host header can give.
(not-modified? headers etag last-modified)Whether a GET or a HEAD with the lower-case headers gets a 304 for the
representation with the entity tag etag and the instant
last-modified, either of which can be nil.
An If-None-Match decides alone: a 304 when it names the tag, or is *. Otherwise an If-Modified-Since gives a 304 when the representation changed at most then, to the second.
Whether a GET or a HEAD with the lower-case `headers` gets a 304 for the representation with the entity tag `etag` and the instant `last-modified`, either of which can be nil. An If-None-Match decides alone: a 304 when it names the tag, or is *. Otherwise an If-Modified-Since gives a 304 when the representation changed at most then, to the second.
(response status content-type body)(response status content-type body more)The Ring response of status with the body of content-type, and the
headers more.
The Ring response of `status` with the `body` of `content-type`, and the headers `more`.
(text-response status message)(text-response status message more)The Ring response of status with the plain text message, and the
headers more, e.g. a refusal.
The Ring response of `status` with the plain text `message`, and the headers `more`, e.g. a refusal.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |