Liking cljdoc? Tell your friends :D

http.async.client

Asynchronous HTTP Client - Clojure

Asynchronous HTTP Client - Clojure
raw docstring

awaitclj

(await response)

Waits for response processing to be finished. Returns same response.

Waits for response processing to be finished.
Returns same response.
sourceraw docstring

bodyclj

(body resp)

Gets body. If body have not yet been delivered and request hasn't failed waits for body.

Gets body.
If body have not yet been delivered and request hasn't failed waits for body.
sourceraw docstring

cancelclj

(cancel resp)

Cancels response.

Cancels response.
sourceraw docstring

cancelled?clj

(cancelled? resp)

Checks if response has been cancelled.

Checks if response has been cancelled.
sourceraw docstring

closeclj

(close client)

Closes client.

Closes client.
sourceraw docstring

close-asyncclj

(close-async client)

Asynchronously closes the underlying AsyncHttpProvider by spawning a thread and avoid blocking AsyncHttpClient. Does not support websocket clients.

Asynchronously closes the underlying AsyncHttpProvider by spawning
a thread and avoid blocking AsyncHttpClient. Does not support
websocket clients.
sourceraw docstring

content-typeclj

(content-type resp)

Gets content type from response.

Gets content type from response.
sourceraw docstring

cookiesclj

(cookies resp)

Gets cookies from response.

Gets cookies from response.
sourceraw docstring

create-clientclj

(create-client &
               {:keys [compression-enabled connection-timeout follow-redirects
                       idle-in-pool-timeout keep-alive max-conns-per-host
                       max-conns-total max-redirects proxy auth read-timeout
                       request-timeout user-agent executor-service
                       ssl-context]})

Creates new Async Http Client. Arguments:

  • :compression-enabled :: enable HTTP compression
  • :connection-timeout :: connections timeout in ms
  • :follow-redirects :: enable following HTTP redirects
  • :idle-in-pool-timeout :: idle connection in pool timeout in ms
  • :keep-alive :: enable HTTP keep alive, enabled by default
  • :max-conns-per-host :: max number of polled connections per host
  • :max-conns-total :: max number of total connections held open by client
  • :max-redirects :: max nuber of redirects to follow
  • :proxy :: map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user
  • :auth :: map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :preemptive - assume authentication is required
  • :read-timeout :: read timeout in ms
  • :request-timeout :: request timeout in ms
  • :user-agent :: User-Agent branding string
  • :executor-service :: provide your own executor service for callbacks to be executed on
  • :ssl-context :: provide your own SSL Context
Creates new Async Http Client.
Arguments:
- :compression-enabled :: enable HTTP compression
- :connection-timeout :: connections timeout in ms
- :follow-redirects :: enable following HTTP redirects
- :idle-in-pool-timeout :: idle connection in pool timeout in ms
- :keep-alive :: enable HTTP keep alive, enabled by default
- :max-conns-per-host :: max number of polled connections per host
- :max-conns-total :: max number of total connections held open by client
- :max-redirects :: max nuber of redirects to follow
- :proxy :: map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
- :auth :: map with authentication to be used
    :type       - either :basic or :digest
    :user       - user name to be used
    :password   - password to be used
    :realm      - realm name to authenticate in
    :preemptive - assume authentication is required
- :read-timeout :: read timeout in ms
- :request-timeout :: request timeout in ms
- :user-agent :: User-Agent branding string
- :executor-service :: provide your own executor service for callbacks to be executed on
- :ssl-context :: provide your own SSL Context
sourceraw docstring

DELETEclj

(DELETE client url & {:as options})

Sends asynchronously HTTP DELETE request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP DELETE request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

done?clj

(done? resp)

Checks if request is finished already (response receiving finished).

Checks if request is finished already (response receiving finished).
sourceraw docstring

errorclj

(error resp)

Returns Throwable if request processing failed.

Returns Throwable if request processing failed.
sourceraw docstring

failed?clj

(failed? resp)

Checks if request failed.

Checks if request failed.
sourceraw docstring

GETclj

(GET client url & {:as options})

Sends asynchronously HTTP GET request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP GET request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

(HEAD client url & {:as options})

Sends asynchronously HTTP HEAD request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP HEAD request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

headersclj

(headers resp)

Gets headers. If headers have not yet been delivered and request hasn't failed waits for headers.

Gets headers.
If headers have not yet been delivered and request hasn't failed waits for headers.
sourceraw docstring

IClosablecljprotocol

-closeclj

(-close this)

-open?clj

(-open? this)
source

locationclj

(location resp)

Retrieves location of redirect.

Retrieves location of redirect.
sourceraw docstring

open?clj

(open? client)

Checks if client is open.

Checks if client is open.
sourceraw docstring

OPTIONSclj

(OPTIONS client url & {:as options})

Sends asynchronously HTTP OPTIONS request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP OPTIONS request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

PATCHclj

(PATCH client url & {:as options})

Sends asynchronously HTTP PATCH request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP PATCH request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

POSTclj

(POST client url & {:as options})

Sends asynchronously HTTP POST request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP POST request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

PUTclj

(PUT client url & {:as options})

Sends asynchronously HTTP PUT request to url. Returns a map:

  • :id - unique ID of request
  • :status - promise that once status is received is delivered, contains lazy map of:
    • :code - response code
    • :msg - response message
    • :protocol - protocol with version
    • :major - major version of protocol
    • :minor - minor version of protocol
  • :headers - promise that once headers are received is delivered, contains lazy map of:
    • :server - header names are keyworded, values stay not changed
  • :body - body of response, depends on request type, might be ByteArrayOutputStream or lazy sequence, use conveniece methods to extract it, like string
  • :done - promise that is delivered once receiving response has finished
  • :error - promise that is delivered if requesting resource failed, once delivered will contain Throwable. Arguments:
  • client - client created via create-client
  • url - URL to request
  • options - keyworded arguments: :query - map of query parameters, if value is vector than multiple values will be send as n=v1&n=v2 :headers - map of headers :body - body :cookies - cookies to send :proxy - map with proxy configuration to be used :host - proxy host :port - proxy port :protocol - (optional) protocol to communicate with proxy, :http (default, if you provide no value) and :https are allowed :user - (optional) user name to use for proxy authentication, has to be provided with :password :password - (optional) password to use for proxy authentication, has to be provided with :user :auth - map with authentication to be used :type - either :basic or :digest :user - user name to be used :password - password to be used :realm - realm name to authenticate in :timeout - request timeout in ms
Sends asynchronously HTTP PUT request to url.
Returns a map:
- :id      - unique ID of request
- :status  - promise that once status is received is delivered, contains lazy map of:
  - :code     - response code
  - :msg      - response message
  - :protocol - protocol with version
  - :major    - major version of protocol
  - :minor    - minor version of protocol
- :headers - promise that once headers are received is delivered, contains lazy map of:
  - :server - header names are keyworded, values stay not changed
- :body    - body of response, depends on request type, might be ByteArrayOutputStream
             or lazy sequence, use conveniece methods to extract it, like string
- :done    - promise that is delivered once receiving response has finished
- :error   - promise that is delivered if requesting resource failed, once delivered
             will contain Throwable.
Arguments:
- client   - client created via create-client
- url      - URL to request
- options  - keyworded arguments:
  :query   - map of query parameters, if value is vector than multiple values
             will be send as n=v1&n=v2
  :headers - map of headers
  :body    - body
  :cookies - cookies to send
  :proxy   - map with proxy configuration to be used
    :host     - proxy host
    :port     - proxy port
    :protocol - (optional) protocol to communicate with proxy,
                :http (default, if you provide no value) and :https are allowed
    :user     - (optional) user name to use for proxy authentication,
                has to be provided with :password
    :password - (optional) password to use for proxy authentication,
                has to be provided with :user
  :auth    - map with authentication to be used
    :type     - either :basic or :digest
    :user     - user name to be used
    :password - password to be used
    :realm    - realm name to authenticate in
  :timeout - request timeout in ms
sourceraw docstring

redirect?clj

(redirect? resp)

Checks if response is redirect.

Checks if response is redirect.
sourceraw docstring

request-streamclj

(request-stream client method url body-part-callback & {:as options})

Consumes stream from given url. method - HTTP method to be used (:get, :post, ...) url - URL to set request to body-part-callback - callback that takes status (ref {}) of request and received body part as vector of bytes options - are optional and can contain :headers, :param, and :query (see prepare-request).

Consumes stream from given url.
method - HTTP method to be used (:get, :post, ...)
url - URL to set request to
body-part-callback - callback that takes status (ref {}) of request
                     and received body part as vector of bytes
options - are optional and can contain :headers, :param, and :query (see prepare-request).
sourceraw docstring

sendclj

(send ws & {text :text byte :byte})

Send message via WebSocket.

Send message via WebSocket.
sourceraw docstring

statusclj

(status resp)

Gets status if status was delivered.

Gets status if status was delivered.
sourceraw docstring

stream-seqclj

(stream-seq client method url & {:as options})

Creates potentially infinite lazy sequence of Http Stream.

Creates potentially infinite lazy sequence of Http Stream.
sourceraw docstring

stringclj

(string resp)
(string headers body)

Converts response to string. Or converts body taking encoding from response.

Converts response to string.
Or converts body taking encoding from response.
sourceraw docstring

uriclj

(uri resp)

Get the request URI from the response

Get the request URI from the response
sourceraw docstring

urlclj

(url resp)

Gets URL from response

Gets URL from response
sourceraw docstring

websocketclj

(websocket client url & options)

Opens WebSocket connection.

Opens WebSocket connection.
sourceraw docstring

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

× close