Liking cljdoc? Tell your friends :D

blueprint.client


build-withclj


Clientclj


default-interceptorsclj


default-optionsclj


invokeclj

(invoke {:keys [parsed-api command-defs] :as client}
        command
        {:keys [input server headers options as throw-exceptions decode-on-error
                interceptors validate-input? coerce-input?]
         :or {interceptors {}
              input nil
              validate-input? true
              server (get client :server)
              as :json
              coerce-input? true
              headers {}
              decode-on-error true
              throw-exceptions true}
         :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:

keydescription
:inputThe request input to be sent
:serverThe remote server endpoint or a function (eg: "http://localhost:8080"); default is first entry from api definition
:headersA map of additional headers to be sent
:optionsA map of additional options to add to the request
:asThe format for content negotation; accepts edn or json; default: json
:interceptorsThe interceptor configuration to apply
:throw-exceptionsControl throwing of exceptions in case of errors; default: true
:decode-on-errorControl 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`
raw docstring

make-clientclj

(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.
raw docstring

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

× close