net.http.client
create-http-methods
macro
added in 3.0
(create-http-methods ks)creates the standard http get, post, etc requests
endpoint-data
added in 3.0
(endpoint-data result)getter-methods
added in 3.0
(getter-methods cls)returns methods of one argument
(keys (getter-methods java.net.http.HttpResponse)) => :body :headers :previous-response :request :ssl-session :status-code :uri :version
http-client
added in 3.0
(http-client)(http-client opts)constructor for java.net.http.HttpClient
(http-client) => java.net.http.HttpClient
http-client-builder
added in 3.0
(http-client-builder)(http-client-builder opts)constructor for java.net.http.HttpClientBuilder
(http-client-builder) => java.net.http.HttpClient$Builder
http-request
added in 3.0
(http-request req)(http-request req method {:keys [expect-continue? headers timeout version body], :as opts})constructor for java.net.http.HttpRequest
(http-request “http://www.yahoo.com”) => java.net.http.HttpRequest
http-request-builder
added in 3.0
(http-request-builder opts)constructor for java.net.http.HttpRequestBuilder
(http-request-builder {:uri “http://www.yahoo.com”}) => java.net.http.HttpRequest$Builder
mock-endpoint
added in 3.0
(mock-endpoint handler route)(mock-endpoint handler route {:keys [format], :or {format :edn}})remote
added in 3.0
(remote url {:keys [id args format], :as opts, :or {format :edn}})creates a remote access to an endpoint
request
added in 3.0
(request req)(request uri {:keys [client as raw type callback error method handler], :as opts, :or {type :sync, as :string, method :get, client (clojure.core/deref +default-client+)}})performs a http request
request-body
added in 3.0
(request-body body)constructs a relevant body publisher
(request-body "") => java.net.http.HttpRequest$BodyPublisher
request-headers
added in 3.0
(request-headers headers)constructs a relevant request header
(vec (request-headers {“Content” “html” “Tags” “a” “b” “c”})) => [“Content” “html” “Tags” “a” “Tags” “b” “Tags” “c”]
response-map
added in 3.0
(response-map resp)constucts a map from java.net.http.HttpResponse
wrap-get-optional
added in 3.0
(wrap-get-optional f)wraps function, nil-punning outputs for java.util.Optional
((wrap-get-optional identity) (java.util.Optional/of “hello”)) => “hello”