Liking cljdoc? Tell your friends :D

ring.mock.request

Functions to create mock request maps.

Functions to create mock request maps.
raw docstring

add-multipart-partclj

(add-multipart-part builder k v)
source

bodycljmultimethod

(body request body-value)

Set the body of the request. The supplied body value can be a string or a map of parameters to be url-encoded.

Set the body of the request. The supplied body value can be a string or
a map of parameters to be url-encoded.
sourceraw docstring

content-lengthclj

(content-length request length)

Set the content length of the request map.

Set the content length of the request map.
sourceraw docstring

content-typeclj

(content-type request mime-type)

Set the content type of the request map.

Set the content type of the request map.
sourceraw docstring

(cookie request cookie-name value)

Add a cookie to the request headers map

Add a cookie to the request headers map
sourceraw docstring

default-portclj

A map of the default ports for a scheme.

A map of the default ports for a scheme.
sourceraw docstring

(header request header value)

Add a HTTP header to the request map.

Add a HTTP header to the request map.
sourceraw docstring

json-bodyclj

(json-body request body-value)

Set the body of the request to a JSON structure. The supplied body value should be a map of parameters to be converted to JSON.

Set the body of the request to a JSON structure. The supplied body value
should be a map of parameters to be converted to JSON.
sourceraw docstring

multipart-bodyclj

(multipart-body request params)

Set the body of the request to a map of parameters encoded as a multipart form. The parameters are supplied as a map. The keys should be keywords or strings. The values should be maps that contain the following keys:

:value - a string, byte array, File or InputStream :filename - the name of the file the value came from (optional) :content-type - the content type of the value (optional)

The value may also be a string, byte array, File or InputStream instead of a map. In that case, it will be treated as if it were a map with a single :value key.

Set the body of the request to a map of parameters encoded as a multipart
form. The parameters are supplied as a map. The keys should be keywords or
strings. The values should be maps that contain the following keys:

  :value        - a string, byte array, File or InputStream
  :filename     - the name of the file the value came from (optional)
  :content-type - the content type of the value (optional)

The value may also be a string, byte array, File or InputStream instead of a
map. In that case, it will be treated as if it were a map with a single :value
key.
sourceraw docstring

multipart-entityclj

(multipart-entity params)
source

query-stringclj

(query-string request params)

Set the query string of the request to a string or a map of parameters.

Set the query string of the request to a string or a map of parameters.
sourceraw docstring

requestclj

(request method uri)
(request method uri params)

Create a minimal valid request map from a HTTP method keyword, a string containing a URI, and an optional map of parameters that will be added to the query string of the URI. The URI can be relative or absolute. Relative URIs are assumed to go to http://localhost.

Create a minimal valid request map from a HTTP method keyword, a string
containing a URI, and an optional map of parameters that will be added to
the query string of the URI. The URI can be relative or absolute. Relative
URIs are assumed to go to http://localhost.
sourceraw docstring

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

× close