Liking cljdoc? Tell your friends :D
Clojure only.

sg.flybot.pullable.remote.client

HTTP client for pull-based APIs.

Provides a simple way to interact with remote pull APIs from the REPL.

(def api (connect "http://localhost:8080/api"))

;; Pull data
(api '{:posts ?posts})

;; With params
(api '{:post {:title ?t}} {:post-id 1})

;; Introspect schema
(schema api)
HTTP client for pull-based APIs.

Provides a simple way to interact with remote pull APIs from the REPL.

```clojure
(def api (connect "http://localhost:8080/api"))

;; Pull data
(api '{:posts ?posts})

;; With params
(api '{:post {:title ?t}} {:post-id 1})

;; Introspect schema
(schema api)
```
raw docstring

connectclj

(connect url)
(connect url {:keys [format client] :or {format :transit-json}})

Create a connection to a pull API endpoint.

Returns a function that executes pull patterns: (def api (connect "http://localhost:8080/api")) (api '{:posts ?posts}) (api '{:post {:title ?t}} {:post-id 1})

Options:

  • :format - Wire format (:transit-json, :transit-msgpack, :edn). Default :transit-json
  • :client - Custom HttpClient instance
Create a connection to a pull API endpoint.

Returns a function that executes pull patterns:
  (def api (connect "http://localhost:8080/api"))
  (api '{:posts ?posts})
  (api '{:post {:title ?t}} {:post-id 1})

Options:
- :format - Wire format (:transit-json, :transit-msgpack, :edn). Default :transit-json
- :client - Custom HttpClient instance
sourceraw docstring

schemaclj

(schema api-fn)

Fetch schema from a connected API.

(schema api)

Fetch schema from a connected API.

(schema api)
sourceraw docstring

urlclj

(url api-fn)

Get the URL of a connected API.

Get the URL of a connected API.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close