jeudi 3 mars 2016

Something similar to mockwebserver in Clojure?

I'm looking for a project similar to mockwebserver in Clojure that allows you to programmatically define HTTP endpoints and their response by matching (parts of) the of the HTTP request (for testing purposes). I know that libraries such as clj-http-fake exists but I'm looking for a library/framework agnostic way of defining the endpoints. I've created something like this myself which allows me to do:

(mws/given-mock-route! mock-web-server "/something" {:status 200 :content-type "application/json" :body (slurp (io/resource "responses/some.json"))})

But I think I read a blog or similar that such as library already exists but I can't seem to find it.

Aucun commentaire:

Enregistrer un commentaire