Liking cljdoc? Tell your friends :D

fluree.db.util.xhttp


close-websocketclj/s

(close-websocket ws)

format-error-responseclj/s

(format-error-response url e)

getclj/s

(get url opts)

Returns result body as a string, or an exception.

If opts contains :body, It is assumed body is already in a format that can be sent directly in request (already encoded).

Options

  • output-format - can be :text, :json or :binary (default text), or special format (wikidata) to handle wikidata errors, which come back as html.
Returns result body as a string, or an exception.

If opts contains :body,
It is assumed body is already in a format that can be sent directly in request (already encoded).

Options
- output-format - can be :text, :json or :binary (default text), or special format (wikidata) to handle wikidata errors, which come back as html.

raw docstring

get-jsonclj/s

(get-json url opts)

http get with JSON response.

If opts contains :body key, it is encoded into JSON and sent as part of the body.

http get with JSON response.

If opts contains :body key, it is encoded into JSON and sent as part
of the body.
raw docstring

post-jsonclj/s

(post-json url message opts)

Posts JSON content. opts is a map with following optional keys: :request-timeout - how many milliseconds until we throw an exception without a response (default 5000)

Posts JSON content.
opts is a map with following optional keys:
:request-timeout - how many milliseconds until we throw an exception without a response (default 5000)
raw docstring

socket-publish-loopclj/s

(socket-publish-loop ws pub-chan)

Sends messages across web socket. Sends never block and will immediately queue. Message to send should be a two-tuple placed on the pub-chan, of: [msg resp-chan] where a true/false response will eventually be placed on the resp-chan if the send is successful.

Sends messages across web socket. Sends never block and will immediately queue.
Message to send should be a two-tuple placed on the pub-chan, of:
  [msg resp-chan]
where a true/false response will eventually be placed on the resp-chan if the send
is successful.
raw docstring

try-socketclj/s

(try-socket url sub-chan pub-chan resp-chan timeout close-fn)

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

× close