Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Less confusing still Feb 3, 2019
Setup.hs WIP Oct 16, 2018
package.yaml Done Oct 20, 2018

Network-less mocking with Servant

This example provides a translation from Servant's requests to WAI requests, and from WAI responses to Servant's responses. It allows calling a Servant-produced Application directly without seizing a port or doing any networking at all. You can write functions that use servant-client-generated bindings, and then run them either against a real remote server, or against a mock Server.

  • Main.hs -- defining a simple mock-server and calling it.
  • Mock.hs -- request-translating machinery.


  • This is a proof-of-concept: streaming is not supported yet.

  • Cookies are not handled faithfully (see servant-client's performRequest).