Liking cljdoc? Tell your friends :D

macchiato.util.request

Functions for augmenting and pulling information from request maps.

Functions for augmenting and pulling information from request maps.
raw docstring

acceptcljs

(accept accept-header)

Parse Accept headers into a sorted sequence of maps specifying the type and sub-type. "text/x-dvi; q=.8; mxb=100000; mxt=5.0, text/x-c" => ({:type "text", :sub-type "x-c", :q 1} {:type "text", :sub-type "x-dvi", :q 0.8, :mxb "100000", :mxt "5.0"})

Parse Accept headers into a sorted sequence of maps specifying the type and sub-type.
"text/x-dvi; q=.8; mxb=100000; mxt=5.0, text/x-c"
=> ({:type "text", :sub-type "x-c", :q 1}
    {:type "text", :sub-type "x-dvi", :q 0.8, :mxb "100000", :mxt "5.0"})
sourceraw docstring

body-stringcljs

(body-string request)

Return the request body as a string.

Return the request body as a string.
sourceraw docstring

character-encodingcljs

(character-encoding request)

Return the character encoding for the request, or nil if it is not set.

Return the character encoding for the request, or nil if it is not set.
sourceraw docstring

content-lengthcljs

(content-length request)

Return the content-length of the request, or nil no content-length is set.

Return the content-length of the request, or nil no content-length is set.
sourceraw docstring

content-typecljs

(content-type request)

Return the content-type of the request, or nil if no content-type is set.

Return the content-type of the request, or nil if no content-type is set.
sourceraw docstring

in-context?cljs

(in-context? request context)

Returns true if the URI of the request is a subpath of the supplied context.

Returns true if the URI of the request is a subpath of the supplied context.
sourceraw docstring

path-infocljs

(path-info request)

Returns the relative path of the request.

Returns the relative path of the request.
sourceraw docstring

re-quotedcljs

HTTP quoted-string: <"> *<any TEXT except "> <">. See RFC2068.

HTTP quoted-string: <"> *<any TEXT except "> <">. See RFC2068.
sourceraw docstring

re-tokencljs

HTTP token: 1*<any CHAR except CTLs or tspecials>. See RFC2068

HTTP token: 1*<any CHAR except CTLs or tspecials>. See RFC2068
sourceraw docstring

re-valuecljs

HTTP value: token | quoted-string. See RFC2109

HTTP value: token | quoted-string. See RFC2109
sourceraw docstring

request-urlcljs

(request-url request)

Return the full URL of the request.

Return the full URL of the request.
sourceraw docstring

set-contextcljs

(set-context request context)

Associate a context and path-info with the request. The request URI must be a subpath of the supplied context.

Associate a context and path-info with the  request. The request URI must be
a subpath of the supplied context.
sourceraw docstring

urlencoded-form?cljs

(urlencoded-form? request)

True if a request contains a urlencoded form in the body.

True if a request contains a urlencoded form in the body.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close