(close-websocket ws)
(format-error-response url e)
(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
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.
(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.
(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)
(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.
(try-socket url sub-chan pub-chan resp-chan timeout close-fn)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close