servant/Servant-API.html

4 lines
5.9 KiB
HTML
Raw Permalink Normal View History

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