Liking cljdoc? Tell your friends :D

hato.client

Core implementation of an HTTP client wrapping JDK11's java.net.http.HttpClient.

Core implementation of an HTTP client wrapping JDK11's java.net.http.HttpClient.
raw docstring

build-http-clientclj

(build-http-client {:keys [authenticator cookie-handler cookie-policy
                           connect-timeout redirect-policy priority proxy
                           ssl-context ssl-parameters version]})

Creates an HttpClient from an option map.

Options: authenticator a java.net.Authenticator or {:user "user" :pass "pass"} cookie-handler a java.net.CookieHandler cookie-policy :none, :all, :original-server. cookie-handler takes precedence if specified connect-timeout in milliseconds redirect-policy :never (default), :normal, :always priority an integer between 1 and 256 inclusive for HTTP/2 requests proxy a java.net.ProxySelector or :no-proxy ssl-context an javax.net.ssl.SSLContext ssl-parameters a javax.net.ssl.SSLParametersversion` :http-1.1 :http-2

Creates an HttpClient from an option map.

Options:
`authenticator` a java.net.Authenticator or {:user "user" :pass "pass"}
`cookie-handler` a java.net.CookieHandler
`cookie-policy` :none, :all, :original-server. cookie-handler takes precedence if specified
`connect-timeout` in milliseconds
`redirect-policy` :never (default), :normal, :always
`priority` an integer between 1 and 256 inclusive for HTTP/2 requests
`proxy` a java.net.ProxySelector or :no-proxy
`ssl-context` an javax.net.ssl.SSLContext
`ssl-parameters a javax.net.ssl.SSLParameters
`version` :http-1.1 :http-2
sourceraw docstring

source

deleteclj

source

getclj

source

source

optionsclj

source

patchclj

source

postclj

source

putclj

source

requestclj

source

request*clj

(request* {:keys [http-client async? as muuntaja] :as req} & [respond raise])
source

ring-request->HttpRequestclj

(ring-request->HttpRequest {:keys [scheme server-name uri server-port
                                   query-string headers request-method timeout
                                   version expect-continue]
                            :or {request-method :get}
                            :as req})

Creates an HttpRequest from a ring request map.

-- Standard ring request Aside from headers, these will be generated via middleware by simply passing a single :url option.

scheme The transport protocol, :http or :https server-name hostname e.g. google.com uri The resource excluding query string and '?', starting with '/'. server-port Integer query-string Query string, if present request-method Lowercase keyword corresponding to a HTTP request method, such as :get or :post. headers Map of lower case strings to header values, concatenated with ',' when multiple values for a key.

-- Options specific to HttpRequest expect-continue boolean (default false) timeout in milliseconds version :http-1.1 :http-2

Creates an HttpRequest from a ring request map.

-- Standard ring request
Aside from headers, these will be generated via middleware by simply passing a single :url option.

`scheme` The transport protocol, :http or :https
`server-name` hostname e.g. google.com
`uri` The resource excluding query string and '?', starting with '/'.
`server-port` Integer
`query-string` Query string, if present
`request-method` Lowercase keyword corresponding to a HTTP request method, such as :get or :post.
`headers` Map of lower case strings to header values, concatenated with ',' when multiple values for a key.

-- Options specific to HttpRequest
`expect-continue` boolean (default false)
`timeout` in milliseconds
`version` :http-1.1 :http-2
sourceraw docstring

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

× close