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 interceptors]
         :or {input nil
              server (base-url parsed-api)
              headers {}
              as :json
              throw-exceptions 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:

keydescription
:inputThe request input to be sent
:serverThe remote server endpoint (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
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 (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
raw docstring

make-clientclj

(make-client api-def)
(make-client api-def {:keys [ssl-context] :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