clj-http.core documentation

Core HTTP request/response implementation.

add-client-params!

(add-client-params! http-client kvs)
Add various client params to the http-client object, if needed.

http-request-for

(http-request-for request-method http-url body)
Provides the HttpRequest object for a particular request-method and url

parse-headers

(parse-headers headers)
Takes a HeaderIterator and returns a map of names to values.

If a name appears more than once (like `set-cookie`) then the value
will be a vector containing the values in the order they appeared
in the headers.

request

(request {:keys [request-method scheme server-name server-port uri query-string headers body multipart debug debug-body socket-timeout conn-timeout insecure? save-request? proxy-host proxy-port as cookie-store retry-handler response-interceptor digest-auth connection-manager client-params], :as req})
Executes the HTTP request corresponding to the given Ring request map and
returns the Ring response map corresponding to the resulting HTTP response.

Note that where Ring uses InputStreams for the request and response bodies,
the clj-http uses ByteArrays for the bodies.