(stub-request original-fn request)
Internal function used by with-http-stub macro
Internal function used by with-http-stub macro
(with-http-stub routes & body)
Takes a map of route/response-fn pairs and executes the body with HTTP requests stubbed. Routes can be:
Response functions should take a request map and return a response map with: {:status 200 :headers {} :body "response"}
Takes a map of route/response-fn pairs and executes the body with HTTP requests stubbed. Routes can be: - Exact URL strings - Regular expressions - Functions that take a URL and return true/false Response functions should take a request map and return a response map with: {:status 200 :headers {} :body "response"}
(with-http-stub-in-isolation routes & body)
Like with-http-stub, but throws an exception if no matching stub is found
Like with-http-stub, but throws an exception if no matching stub is found
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close