<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>Servant.API</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Servant-API.html");};
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="src/Servant-API.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">servant-0.2: A family of combinators for defining webservices APIs and serving them</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">Servant.API</p></div><divid="table-of-contents"><pclass="caption">Contents</p><ul><li><ahref="#g:1">Combinators</a></li><li><ahref="#g:2">Accessing information from the request</a></li><li><ahref="#g:3">Actual endpoints, distinguished by HTTP method</a></li><li><ahref="#g:4">Untyped endpoints</a></li><li><ahref="#g:5">Utilities</a></li></ul></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short">module <ahref="Servant-API-Sub.html">Servant.API.Sub</a></li><liclass="src short">module <ahref="Servant-API-Alternative.html">Servant.API.Alternative</a></li><liclass="src short">module <ahref="Servant-API-Capture.html">Servant.API.Capture</a></li><liclass="src short">module <ahref="Servant-API-QueryParam.html">Servant.API.QueryParam</a></li><liclass="src short">module <ahref="Servant-API-ReqBody.html">Servant.API.ReqBody</a></li><liclass="src short">module <ahref="Servant-API-Get.html">Servant.API.Get</a></li><liclass="src short">module <ahref="Servant-API-Post.html">Servant.API.Post</a></li><liclass="src short">module <ahref="Servant-API-Delete.html">Servant.API.Delete</a></li><liclass="src short">module <ahref="Servant-API-Put.html">Servant.API.Put</a></li><liclass="src short">module <ahref="Servant-API-Raw.html">Servant.API.Raw</a></li><liclass="src short">module <ahref="Servant-Utils-StaticFiles.html">Servant.Utils.StaticFiles</a></li><liclass="src short">module <ahref="Servant-QQ.html">Servant.QQ</a></li><liclass="src short">module <ahref="Servant-Utils-Links.html">Servant.Utils.Links</a></li></ul></div><divid="interface"><h1id="g:1">Combinators</h1><divclass="doc"><p>Type-level combinator for expressing subrouting: <code><code><ahref="Servant-API-Sub.html#t::-62-">:></a></code></code></p></div><divclass="top"><pclass="src">module <ahref="Servant-API-Sub.html">Servant.API.Sub</a></p></div><divclass="doc"><p>Type-level combinator for alternative endpoints: <code><code><ahref="Servant-API-Alternative.html#t::-60--124--62-">:<|></a></code></code></p></div><divclass="top"><pclass="src">module <ahref="Servant-API-Alternative.html">Servant.API.Alternative</a></p></div><h1id="g:2">Accessing information from the request</h1><divclass="doc"><p>Capturing parts of the url path as parsed values: <code><code><ahref="Servant-API-Capture.html#t:Capture">Capture</a></code></code></p></div><divclass="top"><pclass="src">module <ahref="Servant-API-Capture.html">Servant.API.Capture</a></p></div><divclass="doc"><p>Retrieving parameters from the query string of the <code>URI</code>: <code><code><ahref="Servant-API-QueryParam.html#t:QueryParam">QueryParam</a></code></code></p></div><divclass="top"><pclass="src">module <ahref="Servant-API-QueryParam.html">Servant.API.QueryParam</a></p></div><divclass="doc"><p>Accessing the request body as a JSON-encoded type: <code><code><ahref="Servant-API-ReqBody.html#t:ReqBody">ReqBody</a></code></code></p></div><divclass="top"><pclass="src">module <ahref="Servant-API-ReqBody.html">Servant.API.ReqBody</a></p></div><h1id="g:3">Actual endpoints, distinguished by HTTP method</h1><divclass="doc"><p>GET requests</p></div><divclass="top"><pclass="src">module <ahref="Servant-API-Get.html">Servant.API.Get</a></p></div><divclass="doc"><p>POST requests</p></div><divclass="top"><pclass="src">module <ahref="Servant-API-Post.html">Servant.API.Post</a></p></div><divclass="doc"><p>DELETE requests</p></div