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.
(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(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
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |