Open SevereOverfl0w opened 4 months ago
If you have a function like this:
(defn make-request [request] (http/with-additional-middleware [...] (http/request request)))
And you call it with mocking, like so:
(binding [http/request (http/make-request (constantly {:status 201}))] (make-request {...}))
Then the default client (clj-http.core/request) will be used instead of (constantly {:status 201}). This is due to with-middleware rebinding http/request itself
(constantly {:status 201})
with-middleware
http/request
If you have a function like this:
And you call it with mocking, like so:
Then the default client (clj-http.core/request) will be used instead of
(constantly {:status 201})
. This is due towith-middleware
rebindinghttp/request
itself