(read-body body)Returns a json string of either body's parsed content or the error
that happened during parsing.
Returns a json string of either `body`'s parsed content or the error that happened during parsing.
(request-after-delay request)Performs given request after its defined delay time. Returns the
pre-defined body after execution, or an empty object if nil.
Be cautious that the returned content is the pre-defined response body, not the webhook response. Since there's a delay between definition and execution, it's not possible to return it.
request should be a map containing (all optional):
:condition If false, the request won't be sent (default: true):sleep-time Delay in milliseconds before sending the request (default: 60000):body The request body (default: {})Example:
(request-after-delay {:url "http://example.com"
:method :post
:body "{"key":"value"}"
:sleep-time 1000})
;; => "{\"key\":\"value\"}"
(returned immediately, request sent after 1 second)
Performs given `request` after its defined delay time. Returns the
pre-defined body after execution, or an empty object if `nil`.
Be cautious that the returned content is the pre-defined response body,
not the webhook response. Since there's a delay between definition and
execution, it's not possible to return it.
`request` should be a map containing (all optional):
- `:condition` If false, the request won't be sent (default: true)
- `:sleep-time` Delay in milliseconds before sending the request (default: 60000)
- `:body` The request body (default: `{}`)
Example:
(request-after-delay {:url "http://example.com"
:method :post
:body "{\"key\":\"value\"}"
:sleep-time 1000})
;; => `"{\"key\":\"value\"}"`
(returned immediately, request sent after 1 second)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |