babashka.http-client.interceptors
A
Request: adds `:accept` header. Only supported value is `:json`.
value
B
Request: adds `:authorization` header based on `:basic-auth` (a map of `:user` and `:pass`) in request.
value
C
Request: construct uri from map
value
D
Response: based on the value of `:as` in request, decodes as `:string`, `:stream` or `:bytes`. Defaults to `:string`.
valueResponse: decompresses body based on "content-encoding" header. Valid values: `gzip` and `deflate`.
valueDefault interceptor chain. Interceptors are called in order for request and in reverse order for response.
value
F
Request: encodes `:form-params` map and adds `:body`.
value
M
Adds appropriate body and header if making a multipart request.
value
O
Request: adds `:authorization` header based on `:oauth-token` (a string token) in request.
value
Q
Request: encodes `:query-params` map and appends to `:uri`.
value
R
Request: normalize :method option
value
T
throw-on-exceptional-status-codeResponse: throw on exceptional status codes
value
U
- value
We can't use the URI constructor because it encodes all arguments for us. See https://stackoverflow.com/a/77971448/626...
function([uri new-query])