Liking cljdoc? Tell your friends :D

com.moclojer.webhook


read-bodyclj

(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.
sourceraw docstring

request-after-delayclj

(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)
sourceraw docstring

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

× close