net.http.client
Small wrapper around netty for HTTP clients.
async-request
(async-request request-map handler)(async-request {:keys [group channel ssl-ctx]} request-map handler)Execute an asynchronous HTTP request, produce the response asynchronously on the provided handler function.
If no client is provided, create one.
build-client
(build-client)(build-client {:keys [ssl], :as options})Create an http client instance. In most cases you will need only one per JVM. You may need several if you want to operate under different TLS contexts
netty-handler
(netty-handler f transform)Simple netty-handler, everything may happen in channel read, since we’re expecting a full http request.
request
(request request-map)(request client request-map)Execute a request against an asynchronous client. If no client exists, create one. Waits for the response and returns it.
request-chan
(request-chan client request-map ch)(request-chan client request-map)(request-chan request-map)Execute a request against an asynchronous client and produce the response on a promise channel.
request-initializer
(request-initializer ssl? ssl-ctx handler transform host port)Our channel initializer.