HTTP Client
General
22Constructs a `java.net.Authenticator`. Options: * `:user` - the username * `:pass` - the password
functionbabashka.http-client
Constructs a `java.net.CookieHandler` using `java.net.CookieManager`. Options: * `:store` - an optional `java....
functionbabashka.http-client
Constructs a `java.util.concurrent.Executor`. Options: * `:threads` - constructs a `ThreadPoolExecutor` with the...
functionbabashka.http-client
Constructs a `java.net.ProxySelector`. Options: * `:host` - string * `:port` - long
functionbabashka.http-client
Constructs a `javax.net.ssl.SSLContext`. Options: * `:key-store` - a file, URI or URL or anything else that is com...
functionbabashka.http-client
Constructs a `javax.net.ssl.SSLParameters`. Options: * `:ciphers` - a list of cipher suite names * `:protocol...
functionbabashka.http-client
Construct a custom client. To get the same behavior as the (implicit) default client, pass `default-client-opts`. Opt...
functionbabashka.http-client
Options used to create the (implicit) default client.
valuebabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:delete`
functionbabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:get`
functionbabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:head`
functionbabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:patch`
functionbabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:post`
functionbabashka.http-client
- function
babashka.curl
Convenience wrapper for `request` with method `:put`
functionbabashka.http-client
- function
babashka.curl
Perform request. Returns map with at least `:body`, `:status` Options: * `:uri` - the uri to request (required). ...
functionbabashka.http-client
Request: adds `:accept` header. Only supported value is `:json`.
valuebabashka.http-client.interceptors
Request: adds `:authorization` header based on `:basic-auth` (a map of `:user` and `:pass`) in request.
valuebabashka.http-client.interceptors
Request: construct uri from map
valuebabashka.http-client.interceptors
Response: based on the value of `:as` in request, decodes as `:string`, `:stream` or `:bytes`. Defaults to `:string`.
valuebabashka.http-client.interceptors
Response: decompresses body based on "content-encoding" header. Valid values: `gzip` and `deflate`.
valuebabashka.http-client.interceptors
Default interceptor chain. Interceptors are called in order for request and in reverse order for response.
valuebabashka.http-client.interceptors
Request: encodes `:form-params` map and adds `:body`.
valuebabashka.http-client.interceptors
Adds appropriate body and header if making a multipart request.
valuebabashka.http-client.interceptors
Request: adds `:authorization` header based on `:oauth-token` (a string token) in request.
valuebabashka.http-client.interceptors
Request: encodes `:query-params` map and appends to `:uri`.
valuebabashka.http-client.interceptors
Request: normalize :method option
valuebabashka.http-client.interceptors
throw-on-exceptional-status-codeResponse: throw on exceptional status codes
valuebabashka.http-client.interceptors
- value
babashka.http-client.interceptors
We can't use the URI constructor because it encodes all arguments for us. See https://stackoverflow.com/a/77971448/626...
functionbabashka.http-client.interceptors
Closes this WebSocket's input and output abruptly.
functionbabashka.http-client.websocket
Initiates an orderly closure of this WebSocket's output by sending a Close message with the given status code and the ...
functionbabashka.http-client.websocket
Sends a Ping message with bytes from the given buffer.
functionbabashka.http-client.websocket
Sends a Pong message with bytes from the given buffer.
functionbabashka.http-client.websocket
Sends a message to the WebSocket. `data` can be a CharSequence (e.g. string), byte array or ByteBuffer Options: *...
functionbabashka.http-client.websocket
Builds `java.net.http.Websocket` client. * `:uri` - the uri to request (required). May be a string or map of `:sc...
functionbabashka.http-client.websocket