(invoke {:keys [parsed-api command-defs] :as client}
command
{:keys [input server headers options as throw-exceptions decode-on-error
interceptors validate-input?]
:or {input nil
server (get client :server)
headers {}
as :json
throw-exceptions true
decode-on-error true
validate-input? true
interceptors {}}
:as opts})
Invoke a command
on the remote blueprint-based api.
Clients are created with (blueprint.client/make-client api-def)
.
Supported options in opts
:
key | description |
---|---|
:input | The request input to be sent |
:server | The remote server endpoint or a function (eg: "http://localhost:8080"); default is first entry from api definition |
:headers | A map of additional headers to be sent |
:options | A map of additional options to add to the request |
:as | The format for content negotation; accepts edn or json ; default: json |
:interceptors | The interceptor configuration to apply |
:throw-exceptions | Control throwing of exceptions in case of errors; default: true |
:decode-on-error | Control decoding of response body in case of errors; default: true |
Invoke a `command` on the remote blueprint-based api. Clients are created with `(blueprint.client/make-client api-def)`. Supported options in `opts`: | key | description | | ----------------------|-------------| | `:input` | The request input to be sent | `:server` | The remote server endpoint or a function (eg: "http://localhost:8080"); default is first entry from api definition | `:headers` | A map of additional headers to be sent | `:options` | A map of additional options to add to the request | `:as` | The format for content negotation; accepts `edn` or `json`; default: `json` | `:interceptors` | The interceptor configuration to apply | `:throw-exceptions` | Control throwing of exceptions in case of errors; default: `true` | `:decode-on-error` | Control decoding of response body in case of errors; default: `true`
(make-client api-def)
(make-client api-def {:keys [ssl-context server] :as default-options})
Create a blueprint client from a blueprint api definition.
Create a blueprint client from a blueprint api definition.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close