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.
raw 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.
raw docstring

cancelclj

(cancel resp)

Cancels response.

Cancels response.
raw docstring

cancelled?clj

(cancelled? resp)

Checks if response has been cancelled.

Checks if response has been cancelled.
raw docstring

closeclj

(close client)

Closes client.

Closes client.
raw docstring

close-websocketclj

(close-websocket ws)

content-typeclj

(content-type resp)

Gets content type from response.

Gets content type from response.
raw docstring

cookiesclj

(cookies resp)

Gets cookies from response.

Gets cookies from response.
raw 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 thread-factory 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
  • :thread-factory :: Provide your own ThreadFactory for callbacks to be executed with
  • :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
- :thread-factory :: Provide your own ThreadFactory for callbacks to be executed with
- :ssl-context :: provide your own SSL Context
raw 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
raw docstring

done?clj

(done? resp)

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

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

errorclj

(error resp)

Returns Throwable if request processing failed.

Returns Throwable if request processing failed.
raw docstring

failed?clj

(failed? resp)

Checks if request failed.

Checks if request failed.
raw 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
raw 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
raw 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.
raw docstring

IClosablecljprotocol

-closeclj

(-close this)

-open?clj

(-open? this)

locationclj

(location resp)

Retrieves location of redirect.

Retrieves location of redirect.
raw docstring

open?clj

(open? client)

Checks if client is open.

Checks if client is open.
raw 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
raw 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
raw 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
raw 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
raw docstring

redirect?clj

(redirect? resp)

Checks if response is redirect.

Checks if response is redirect.
raw 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).
raw docstring

sendclj

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

Send message via WebSocket.

Send message via WebSocket.
raw docstring

statusclj

(status resp)

Gets status if status was delivered.

Gets status if status was delivered.
raw 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.
raw 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.
raw docstring

uriclj

(uri resp)

Get the request URI from the response

Get the request URI from the response
raw docstring

urlclj

(url resp)

Gets URL from response

Gets URL from response
raw docstring

websocketclj

(websocket client url & options)

Opens WebSocket connection.

Opens WebSocket connection.
raw docstring

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

× close