Liking cljdoc? Tell your friends :D

unixsocket-http.core


clientclj

(client socket-path)
(client socket-path
        {:keys [builder-fn timeout-ms read-timeout-ms write-timeout-ms
                connect-timeout-ms call-timeout-ms]
         :or {builder-fn identity timeout-ms 0}})

Create a new HTTP client that utilises the given UNIX domain socket to perform HTTP communication. Options are:

  • :timeout-ms: A timeout that will be used for connect/call/read/write timeout settings, unless they are explicitly specified using the following options:
    • :connect-timeout-ms
    • :call-timeout-ms
    • :read-timeout-ms
    • :write-timeout-ms
  • :builder-fn: a function that will be called on the underlying OkHttpClient$Builder and can be used to perform arbitrary adjustments to the HTTP client.
Create a new HTTP client that utilises the given UNIX domain socket to
perform HTTP communication. Options are:

- `:timeout-ms`: A timeout that will be used for connect/call/read/write
  timeout settings, unless they are explicitly specified using the
  following options:
  - `:connect-timeout-ms`
  - `:call-timeout-ms`
  - `:read-timeout-ms`
  - `:write-timeout-ms`
- `:builder-fn`: a function that will be called on the underlying
  `OkHttpClient$Builder` and can be used to perform arbitrary adjustments
  to the HTTP client.

sourceraw docstring

deleteclj

(delete client url)
(delete client url opts)

Perform a DELETE request against the given client. Options are:

  • :headers: a map of string/string pairs that will be sent as headers.
  • :query-params: a map of string/string pairs that will be sent as the query string.
  • :as: if set to :stream the response's body will be an InputStream value (that needs to be closed after consuming).
  • :throw-exceptions: if set to false all responses will be returned and no exception is thrown on HTTP error codes.
Perform a DELETE request against the given client. Options are:

- `:headers`:          a map of string/string pairs that will be sent as headers.
- `:query-params`:     a map of string/string pairs that will be sent as the query string.
- `:as`:               if set to `:stream` the response's body will be an `InputStream` value (that needs to be closed after consuming).
- `:throw-exceptions`: if set to `false` all responses will be returned and no exception is thrown on HTTP error codes.
sourceraw docstring

getclj

(get client url)
(get client url opts)

Perform a GET request against the given client. Options are:

  • :headers: a map of string/string pairs that will be sent as headers.
  • :query-params: a map of string/string pairs that will be sent as the query string.
  • :as: if set to :stream the response's body will be an InputStream value (that needs to be closed after consuming).
  • :throw-exceptions: if set to false all responses will be returned and no exception is thrown on HTTP error codes.
Perform a GET request against the given client. Options are:

- `:headers`:          a map of string/string pairs that will be sent as headers.
- `:query-params`:     a map of string/string pairs that will be sent as the query string.
- `:as`:               if set to `:stream` the response's body will be an `InputStream` value (that needs to be closed after consuming).
- `:throw-exceptions`: if set to `false` all responses will be returned and no exception is thrown on HTTP error codes.
sourceraw docstring

(head client url)
(head client url opts)

Perform a HEAD request against the given client. Options are:

  • :headers: a map of string/string pairs that will be sent as headers.
  • :query-params: a map of string/string pairs that will be sent as the query string.
  • :as: if set to :stream the response's body will be an InputStream value (that needs to be closed after consuming).
  • :throw-exceptions: if set to false all responses will be returned and no exception is thrown on HTTP error codes.
Perform a HEAD request against the given client. Options are:

- `:headers`:          a map of string/string pairs that will be sent as headers.
- `:query-params`:     a map of string/string pairs that will be sent as the query string.
- `:as`:               if set to `:stream` the response's body will be an `InputStream` value (that needs to be closed after consuming).
- `:throw-exceptions`: if set to `false` all responses will be returned and no exception is thrown on HTTP error codes.
sourceraw docstring

postclj

(post client url)
(post client url opts)

Perform a POST request against the given client. Options are:

  • :headers: a map of string/string pairs that will be sent as headers.
  • :query-params: a map of string/string pairs that will be sent as the query string.
  • :as: if set to :stream the response's body will be an InputStream value (that needs to be closed after consuming).
  • :throw-exceptions: if set to false all responses will be returned and no exception is thrown on HTTP error codes.
Perform a POST request against the given client. Options are:

- `:headers`:          a map of string/string pairs that will be sent as headers.
- `:query-params`:     a map of string/string pairs that will be sent as the query string.
- `:as`:               if set to `:stream` the response's body will be an `InputStream` value (that needs to be closed after consuming).
- `:throw-exceptions`: if set to `false` all responses will be returned and no exception is thrown on HTTP error codes.
sourceraw docstring

putclj

(put client url)
(put client url opts)

Perform a PUT request against the given client. Options are:

  • :headers: a map of string/string pairs that will be sent as headers.
  • :query-params: a map of string/string pairs that will be sent as the query string.
  • :as: if set to :stream the response's body will be an InputStream value (that needs to be closed after consuming).
  • :throw-exceptions: if set to false all responses will be returned and no exception is thrown on HTTP error codes.
Perform a PUT request against the given client. Options are:

- `:headers`:          a map of string/string pairs that will be sent as headers.
- `:query-params`:     a map of string/string pairs that will be sent as the query string.
- `:as`:               if set to `:stream` the response's body will be an `InputStream` value (that needs to be closed after consuming).
- `:throw-exceptions`: if set to `false` all responses will be returned and no exception is thrown on HTTP error codes.
sourceraw docstring

requestclj

(request request)
source

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

× close