http-mock- HTTP mocking and expectations library for Haskell

Copyright(c) 2019 Fernando Rincon Martin
MaintainerFernando Rincon <>
Safe HaskellNone




This module provides tools for testing http clients agains a mocked API.

Currently the support is very basic, and is only limited to the withMockedManager, wich, passing a Wai Application and a function that accepts a http-client manager, it will run the function passing a spcial manager who all the request to that manager will be processed by the Application passed as an argument.

Note that the current implementation uses Unix Domain sockets in order to serve all the request, so most probably the code will not work in windows.


Mocking Functions

withMockedManager :: Application -> (Manager -> IO a) -> IO a Source #

Run a action passing a http client Manager that uses the Application as resolver for all requests