Liking cljdoc? Tell your friends :D

clj-http.core

Core HTTP request/response implementation. Rewrite for Apache 4.3

Core HTTP request/response implementation. Rewrite for Apache 4.3
raw docstring

*cookie-store*clj

source

add-retry-handlerclj

(add-retry-handler builder handler)
source

build-async-http-clientclj

(build-async-http-client {:keys [request-interceptor response-interceptor
                                 proxy-host proxy-port async-http-builder-fns]
                          :as req}
                         conn-mgr
                         &
                         [http-url proxy-ignore-hosts])

Builds an Apache HttpAsyncClient from a clj-http request map. Optional arguments http-url and proxy-ignore-hosts are used to specify the host and a list of hostnames to ignore for any proxy settings. They can be safely ignored if not using proxies.

Builds an Apache `HttpAsyncClient` from a clj-http request map. Optional
arguments `http-url` and `proxy-ignore-hosts` are used to specify the host
and a list of hostnames to ignore for any proxy settings. They can be safely
ignored if not using proxies.
sourceraw docstring

build-cache-configclj

(build-cache-config request)

Given a request with :cache-config as a map or a CacheConfig object, return a CacheConfig object, or nil if no cache config is found. If :cache-config is a map, it checks for the following options:

  • :allow-303-caching
  • :asynchronous-worker-idle-lifetime-secs
  • :asynchronous-workers-core
  • :asynchronous-workers-max
  • :heuristic-caching-enabled
  • :heuristic-coefficient
  • :heuristic-default-lifetime
  • :max-cache-entries
  • :max-object-size
  • :max-update-retries
  • :never-cache-http10-responses-with-query-string
  • :revalidation-queue-size
  • :shared-cache
  • :weak-etag-on-put-delete-allowed
Given a request with :cache-config as a map or a CacheConfig object, return a
CacheConfig object, or nil if no cache config is found. If :cache-config is a
map, it checks for the following options:
- :allow-303-caching
- :asynchronous-worker-idle-lifetime-secs
- :asynchronous-workers-core
- :asynchronous-workers-max
- :heuristic-caching-enabled
- :heuristic-coefficient
- :heuristic-default-lifetime
- :max-cache-entries
- :max-object-size
- :max-update-retries
- :never-cache-http10-responses-with-query-string
- :revalidation-queue-size
- :shared-cache
- :weak-etag-on-put-delete-allowed
sourceraw docstring

build-http-clientclj

(build-http-client {:keys [retry-handler request-interceptor
                           response-interceptor proxy-host proxy-port
                           http-builder-fns cookie-spec cookie-policy-registry
                           http-client-builder]
                    :as req}
                   caching?
                   conn-mgr
                   &
                   [http-url proxy-ignore-hosts])

Builds an Apache HttpClient from a clj-http request map. Optional arguments http-url and proxy-ignore-hosts are used to specify the host and a list of hostnames to ignore for any proxy settings. They can be safely ignored if not using proxies.

Builds an Apache `HttpClient` from a clj-http request map. Optional arguments
`http-url` and `proxy-ignore-hosts` are used to specify the host and a list of
hostnames to ignore for any proxy settings. They can be safely ignored if not
using proxies.
sourceraw docstring

(create-custom-cookie-policy-registry cookie-spec-fn)

Given a function that will take an HttpContext and return a CookieSpec, create a new Registry for the cookie policy under the CUSTOM_COOKIE_POLICY string.

Given a function that will take an HttpContext and return a CookieSpec,
create a new Registry for the cookie policy under the CUSTOM_COOKIE_POLICY
string.
sourceraw docstring

credentials-providerclj

(credentials-provider)
source

source

default-redirect-strategyclj

(default-redirect-strategy original req)

Proxies calls to whatever original redirect strategy is passed in, however, if :validate-redirects is set in the request, checks that the redirected host is not empty.

Proxies calls to whatever original redirect strategy is passed in, however,
if :validate-redirects is set in the request, checks that the redirected host
is not empty.
sourceraw docstring

Method to retrieve the cookie policy that should be used for the request. This is a multimethod that may be extended to return your own cookie policy. Dispatches based on the :cookie-policy key in the request map.

Method to retrieve the cookie policy that should be used for the request.
This is a multimethod that may be extended to return your own cookie policy.
Dispatches based on the `:cookie-policy` key in the request map.
sourceraw docstring

get-redirect-strategyclj

(get-redirect-strategy {:keys [redirect-strategy] :as req})
source

get-route-plannerclj

(get-route-planner proxy-host proxy-port proxy-ignore-hosts http-url)

Return an HttpRoutePlanner that either use the supplied proxy settings if any, or the JVM/system proxy settings otherwise

Return an HttpRoutePlanner that either use the supplied proxy settings
if any, or the JVM/system proxy settings otherwise
sourceraw docstring

graceful-redirect-strategyclj

(graceful-redirect-strategy req)

Similar to the default redirect strategy, however, does not throw an error when the maximum number of redirects has been reached. Still supports validating that the new redirect host is not empty.

Similar to the default redirect strategy, however, does not throw an error
when the maximum number of redirects has been reached. Still supports
validating that the new redirect host is not empty.
sourceraw docstring

http-contextclj

(http-context caching? request-config http-client-context)
source

http-getclj

(http-get)
source

http-request-forclj

(http-request-for request-method http-url body)

Provides the HttpRequest object for a particular request-method and url

Provides the HttpRequest object for a particular request-method and url
sourceraw docstring

make-proxy-methodclj

(make-proxy-method method url)
source

make-proxy-method-with-bodyclj

(make-proxy-method-with-body method)
source

parse-headersclj

(parse-headers headers & [use-header-maps-in-response?])

Takes a HeaderIterator and returns a map of names to values.

If a name appears more than once (like set-cookie) then the value will be a vector containing the values in the order they appeared in the headers.

Takes a HeaderIterator and returns a map of names to values.

If a name appears more than once (like `set-cookie`) then the value
will be a vector containing the values in the order they appeared
in the headers.
sourceraw docstring

proxy-copy-with-bodyclj

source

proxy-delete-with-bodyclj

source

proxy-get-with-bodyclj

source

proxy-move-with-bodyclj

source

proxy-patch-with-bodyclj

source

requestclj

(request req)
(request {:keys [body connection-timeout connection-request-timeout
                 connection-manager cookie-store cookie-policy headers multipart
                 query-string redirect-strategy max-redirects retry-handler
                 request-method scheme server-name server-port socket-timeout
                 uri response-interceptor proxy-host proxy-port
                 http-client-context http-request-config http-client
                 proxy-ignore-hosts proxy-user proxy-pass digest-auth ntlm-auth
                 multipart-mode multipart-charset conn-timeout
                 conn-request-timeout]
          :as req}
         respond
         raise)
source

request-configclj

(request-config {:keys [connection-timeout connection-request-timeout
                        socket-timeout max-redirects cookie-spec normalize-uri
                        conn-request-timeout conn-timeout]
                 :as req})
source

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

× close