Liking cljdoc? Tell your friends :D

httpkit.stub


with-global-http-stubcljmacro

(with-global-http-stub routes & body)

Makes all wrapped http-kit requests first match against given routes. The actual HTTP request will be sent only if no matches are found.

Makes all wrapped http-kit requests first match against given routes.
The actual HTTP request will be sent only if no matches are found.
sourceraw docstring

with-global-http-stub-in-isolationcljmacro

(with-global-http-stub-in-isolation routes & body)

Makes all wrapped http-kit requests first match against given routes. If no route matches, an exception is thrown.

Makes all wrapped http-kit requests first match against given routes.
If no route matches, an exception is thrown.
sourceraw docstring

with-http-stubcljmacro

(with-http-stub routes & body)

Makes all wrapped http-kit requests first match against given routes. Routes should be in the format: {"http://example.com" {:get (fn [req] {:status 200}) :post (fn [req] {:status 201}) :any (fn [req] {:status 200}) :times 2}} ; New :times support

Makes all wrapped http-kit requests first match against given routes.
Routes should be in the format:
{"http://example.com" 
 {:get (fn [req] {:status 200})
  :post (fn [req] {:status 201})
  :any (fn [req] {:status 200})
  :times 2}}  ; New :times support
sourceraw docstring

with-http-stub-in-isolationcljmacro

(with-http-stub-in-isolation routes & body)

Makes all wrapped http-kit requests first match against given routes. If no route matches, an exception is thrown.

Makes all wrapped http-kit requests first match against given routes.
If no route matches, an exception is thrown.
sourceraw docstring

wrap-request-with-stubclj

(wrap-request-with-stub client)
source

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

× close