I want to manually create a Response in order to mock a web server, similar to this blog post. However, the Network.Wreq library that I'm using doesn't reveal the constructor for Response. How do I create a Response manually?
Looking at the sources of wreq reveals that the Response type comes from the http-client library. That is the same library used by the blog post you link to, and so the solution is the same that, presumably, was used in the post: import Network.HTTP.Client.Internal, which exports the constructor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With