Skip to main content

HTTP Client

  • ->Authenticator

    Constructs a `java.net.Authenticator`. Options: * `:user` - the username * `:pass` - the password

  • ->CookieHandler

    Constructs a `java.net.CookieHandler` using `java.net.CookieManager`. Options: * `:store` - an optional `java....

  • ->Executor

    Constructs a `java.util.concurrent.Executor`. Options: * `:threads` - constructs a `ThreadPoolExecutor` with the...

  • ->ProxySelector

    Constructs a `java.net.ProxySelector`. Options: * `:host` - string * `:port` - long

  • ->SSLContext

    Constructs a `javax.net.ssl.SSLContext`. Options: * `:key-store` - a file, URI or URL or anything else that is com...

  • ->SSLParameters

    Constructs a `javax.net.ssl.SSLParameters`. Options: * `:ciphers` - a list of cipher suite names * `:protocol...

  • client

    Construct a custom client. To get the same behavior as the (implicit) default client, pass `default-client-opts`. Opt...

  • default-client-opts

    Options used to create the (implicit) default client.

  • delete

    Convenience wrapper for `request` with method `:delete`

  • get

    Convenience wrapper for `request` with method `:get`

  • head

    Convenience wrapper for `request` with method `:head`

  • patch

    Convenience wrapper for `request` with method `:patch`

  • post

    Convenience wrapper for `request` with method `:post`

  • put

    Convenience wrapper for `request` with method `:put`

  • request

    Perform request. Returns map with at least `:body`, `:status` Options: * `:uri` - the uri to request (required). ...

  • accept-header

    Request: adds `:accept` header. Only supported value is `:json`.

  • basic-auth

    Request: adds `:authorization` header based on `:basic-auth` (a map of `:user` and `:pass`) in request.

  • construct-uri

    Request: construct uri from map

  • decode-body

    Response: based on the value of `:as` in request, decodes as `:string`, `:stream` or `:bytes`. Defaults to `:string`.

  • decompress-body

    Response: decompresses body based on "content-encoding" header. Valid values: `gzip` and `deflate`.

  • default-interceptors

    Default interceptor chain. Interceptors are called in order for request and in reverse order for response.

  • form-params

    Request: encodes `:form-params` map and adds `:body`.

  • multipart

    Adds appropriate body and header if making a multipart request.

  • oauth-token

    Request: adds `:authorization` header based on `:oauth-token` (a string token) in request.

  • query-params

    Request: encodes `:query-params` map and appends to `:uri`.

  • request-method

    Request: normalize :method option

  • throw-on-exceptional-status-code

    Response: throw on exceptional status codes

  • uri-with-query

    We can't use the URI constructor because it encodes all arguments for us. See https://stackoverflow.com/a/77971448/626...

  • abort!

    Closes this WebSocket's input and output abruptly.

  • close!

    Initiates an orderly closure of this WebSocket's output by sending a Close message with the given status code and the ...

  • ping!

    Sends a Ping message with bytes from the given buffer.

  • pong!

    Sends a Pong message with bytes from the given buffer.

  • send!

    Sends a message to the WebSocket. `data` can be a CharSequence (e.g. string), byte array or ByteBuffer Options: *...

  • websocket

    Builds `java.net.http.Websocket` client. * `:uri` - the uri to request (required). May be a string or map of `:sc...