(sni-enabled-client)
REPL usage example: => (require '[org.httpkit.client :as http]) => (require '[yle-clj-common.httpkit-client :refer :all]) => @(http/get "https://soundcloud.com" {:client (sni-enabled-client)}) In production use, initialize the httpkit-client once and reuse when needed (see docs for sni-enabled-client-cached).
REPL usage example: => (require '[org.httpkit.client :as http]) => (require '[yle-clj-common.httpkit-client :refer :all]) => @(http/get "https://soundcloud.com" {:client (sni-enabled-client)}) In production use, initialize the httpkit-client once and reuse when needed (see docs for sni-enabled-client-cached).
Obtain a cached HTTP client per host.
Works around an AWS/HTTP Kit issue: SNI-enabled client can occasionally result in HTTP error response 421's when same client instance is used to access sites under different AWS accounts. As a workaround we can use separate HTTP client per hostname.
This function will Leak memory if arbitrary domains are called without limit.
Obtain a cached HTTP client per host. Works around an AWS/HTTP Kit issue: SNI-enabled client can occasionally result in HTTP error response 421's when same client instance is used to access sites under different AWS accounts. As a workaround we can use separate HTTP client per hostname. This function will Leak memory if arbitrary domains are called without limit.
(sni-enabled-ssl-configurer ssl-engine uri)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close