Request
cookies
(Fn [(Ref Request a)] (Ref (Array Cookie) a))
gets the cookies
property of a Request
.
del
(Fn [URI, (Array Cookie), (Map String (Array String)), String] Request)
(del uri cookies headers body)
builds a HTTP DELETE request (version 1.1
).
get
(Fn [URI, (Array Cookie), (Map String (Array String)), String] Request)
(get uri cookies headers body)
builds a HTTP GET request (version 1.1
).
headers
(Fn [(Ref Request a)] (Ref (Map String (Array String)) a))
gets the headers
property of a Request
.
ignore-body?
(Fn [(Ref Request a)] Bool)
(ignore-body? r)
checks whether the body of the request should be ignored.
init
(Fn [String, String, URI, (Array Cookie), (Map String (Array String)), String] Request)
creates a Request
.
parse
(Fn [(Ref String a)] (Result Request String))
(parse txt)
parses a HTTP request from a string txt
.
Returns an (Error String)
holding the error message if it fails, otherwise
it will return a (Success Request)
.
patch
(Fn [URI, (Array Cookie), (Map String (Array String)), String] Request)
(patch uri cookies headers body)
builds a HTTP PATCH request (version 1.1
).
post
(Fn [URI, (Array Cookie), (Map String (Array String)), String] Request)
(post uri cookies headers body)
builds a HTTP POST request (version 1.1
).
put
(Fn [URI, (Array Cookie), (Map String (Array String)), String] Request)
(put uri cookies headers body)
builds a HTTP PUT request (version 1.1
).
request
(Fn [String, URI, (Array Cookie), (Map String (Array String)), String] Request)
(request verb uri cookies headers body)
builds a HTTP 1.1
request.
set-body!
(Fn [(Ref Request a), String] ())
sets the body
property of a Request
in place.
set-cookies
(Fn [Request, (Array Cookie)] Request)
sets the cookies
property of a Request
.
set-cookies!
(Fn [(Ref Request a), (Array Cookie)] ())
sets the cookies
property of a Request
in place.
set-headers
(Fn [Request, (Map String (Array String))] Request)
sets the headers
property of a Request
.
set-headers!
(Fn [(Ref Request a), (Map String (Array String))] ())
sets the headers
property of a Request
in place.
set-verb!
(Fn [(Ref Request a), String] ())
sets the verb
property of a Request
in place.
set-version!
(Fn [(Ref Request a), String] ())
sets the version
property of a Request
in place.
str
(Fn [(Ref Request a)] String)
(str r)
stringifies the request. It should be stringified exactly as it looks on the wire.
update-body
(Fn [Request, (Ref (Fn [String] String a) b)] Request)
updates the body
property of a Request
using a function f
.
update-cookies
(Fn [Request, (Ref (Fn [(Array Cookie)] (Array Cookie) a) b)] Request)
updates the cookies
property of a Request
using a function f
.
update-headers
(Fn [Request, (Ref (Fn [(Map String (Array String))] (Map String (Array String)) a) b)] Request)
updates the headers
property of a Request
using a function f
.
update-uri
(Fn [Request, (Ref (Fn [URI] URI a) b)] Request)
updates the uri
property of a Request
using a function f
.
update-verb
(Fn [Request, (Ref (Fn [String] String a) b)] Request)
updates the verb
property of a Request
using a function f
.
update-version
(Fn [Request, (Ref (Fn [String] String a) b)] Request)
updates the version
property of a Request
using a function f
.