website/docs/ddoc/primitives/handy_http_primitives.handl...

37 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>HttpRequestHandler (handy_http_primitives.handler.HttpRequestHandler)</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="style.css" rel="stylesheet" />
<script src="script.js" type="text/javascript"></script>
<link href="search-results.html" rel="prefetch" />
</head>
<body>
<div id="page-header">
<div id="logotype">
<span>Documentation</span>
<nav>
<a href="http://dlang.org/">Dlang.org</a>
</nav>
</div>
<form action="search-docs.html" id="search">
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
<input type="submit" value="Go" />
</form>
</div>
<div id="page-body">
<div id="page-content">
<h1>HttpRequestHandler</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_primitives.html">handy_http_primitives</a> <a class="breadcrumb" href="handy_http_primitives.handler.html">handler</a> </div><div><div class="documentation-comment synopsis"><div><p>Defines the request handler interface, which is called upon to handle an
incoming HTTP request.</p></div></div></div><div class="annotated-prototype"><div class="aggregate-prototype"><div class="attributes"></div><span class="builtin-type">interface</span> HttpRequestHandler {<div class="aggregate-member"><a href="handy_http_primitives.handler.HttpRequestHandler.handle.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">handle</span>(ServerHttpRequest request, ServerHttpResponse response);</a></div><div class="aggregate-member"><a href="handy_http_primitives.handler.HttpRequestHandler.of.1.html"><span class="storage-class">static</span> <tt class="highlighted"><span class="hid">HttpRequestHandler</span></tt> <span class="name">of</span>(void function(ref ServerHttpRequest, ref ServerHttpResponse) fn);</a></div><div class="aggregate-member"><a href="handy_http_primitives.handler.HttpRequestHandler.of.2.html"><span class="storage-class">static</span> <tt class="highlighted"><span class="hid">HttpRequestHandler</span></tt> <span class="name">of</span>(void delegate(ref ServerHttpRequest, ref ServerHttpResponse) dg);</a></div>}</div></div><h2 id="members"><a class="header-anchor" href="#members">Members</a></h2><h3 class="member-list-header hide-from-toc" id="function"><a class="header-anchor" href="#function">Functions</a></h3><dl class="member-list native"><dt><a href="handy_http_primitives.handler.HttpRequestHandler.handle.html">handle</a><div class="simplified-prototype" style="max-width: 73ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">handle</span>(ServerHttpRequest request, ServerHttpResponse response)</div></dt><dd><div><p>Invoked to handle an incoming HTTP request. Implementations should read
information from the request, and write to the response.</p></div></dd></dl><h3 class="member-list-header hide-from-toc" id="static function"><a class="header-anchor" href="#static function">Static functions</a></h3><dl class="member-list native"><dt><a href="handy_http_primitives.handler.HttpRequestHandler.of.1.html">of</a><div class="simplified-prototype" style="max-width: 94ch;"><tt class="highlighted"><span class="hid">HttpRequestHandler</span></tt> <span class="name">of</span>(void function(ref ServerHttpRequest, ref ServerHttpResponse) fn)</div></dt><dd><div><p>Gets a request handler that invokes the given function.</p></div></dd><dt><a href="handy_http_primitives.handler.HttpRequestHandler.of.2.html">of</a><div class="simplified-prototype" style="max-width: 94ch;"><tt class="highlighted"><span class="hid">HttpRequestHandler</span></tt> <span class="name">of</span>(void delegate(ref ServerHttpRequest, ref ServerHttpResponse) dg)</div></dt><dd><div><p>Gets a request handler that invokes the given delegate.</p></div></dd></dl><div></div></div>
<div id="page-nav"><a class="parent" href="handy_http_primitives.html">handy_http_primitives</a> <a class="parent" href="handy_http_primitives.handler.html">handler</a>
<span class="type-separator">interfaces</span><ul><li><a class="interface current" href="handy_http_primitives.handler.HttpRequestHandler.html">HttpRequestHandler</a></li></ul></div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>