42 lines
7.2 KiB
HTML
42 lines
7.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>handy_http_handlers.path_handler (handy_http_handlers.path_handler)</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>handy_http_handlers.path_handler</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_handlers.html">handy_http_handlers</a> </div><div><div class="documentation-comment synopsis"><div><p>Defines a path-matching request handler, that will match incoming requests
|
|
against a set of mappings based on the URL and HTTP method, and call a
|
|
handler depending on what's matched.</p></div></div></div><div class="annotated-prototype"></div><h2 id="members"><a class="header-anchor" href="#members">Members</a></h2><h3 class="member-list-header hide-from-toc" id="class"><a class="header-anchor" href="#class">Classes</a></h3><dl class="member-list native"><dt><a href="handy_http_handlers.path_handler.PathHandler.html">PathHandler</a><div class="simplified-prototype" style="max-width: 18ch;"><span class="builtin-type">class</span> <span class="name">PathHandler</span></div></dt><dd><div><p>A request handler that maps incoming requests to a particular handler based
|
|
on the request's URL path and/or HTTP method (GET, POST, etc.).</p></div></dd><dt><a href="handy_http_handlers.path_handler.PathHandlerContextData.html">PathHandlerContextData</a><div class="simplified-prototype" style="max-width: 30ch;"><span class="builtin-type">class</span> <span class="name">PathHandlerContextData</span></div></dt><dd><div><p>Context data that may be attached to a request to provide additional data
|
|
from path matching results, like any path variables that were found.</p></div></dd></dl><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_handlers.path_handler.getMethodBit.html">getMethodBit</a><div class="simplified-prototype" style="max-width: 37ch;"><tt class="highlighted"><span class="type">ushort</span></tt> <span class="name">getMethodBit</span>(string method)</div></dt><dd><div><p>Maps each HTTP method to a bit value, so we can use bit-masking for handler mappings.</p></div></dd><dt><a href="handy_http_handlers.path_handler.getPathParamAs.html">getPathParamAs</a><div class="simplified-prototype" style="max-width: 79ch;"><tt class="highlighted"><span class="hid">T</span></tt> <span class="name">getPathParamAs</span>(ServerHttpRequest request, string name, T defaultValue)</div></dt><dd><div><p>Gets a specific path variable's value.</p></div></dd><dt><a href="handy_http_handlers.path_handler.getPathParams.html">getPathParams</a><div class="simplified-prototype" style="max-width: 69ch;"><tt class="highlighted"><span class="kwrd">immutable</span>(<span class="hid">PathParam</span>[])</tt> <span class="name">getPathParams</span>(ServerHttpRequest request)</div></dt><dd><div><p>Gets the set of path variables that were matched when the given request was
|
|
handled by the path handler.</p></div></dd><dt><a href="handy_http_handlers.path_handler.methodMaskFromAll.html">methodMaskFromAll</a><div class="simplified-prototype" style="max-width: 28ch;"><tt class="highlighted"><span class="type">ushort</span></tt> <span class="name">methodMaskFromAll</span>()</div></dt><dd><div><p>Gets a bitmask that matches all HTTP methods.</p></div></dd><dt><a href="handy_http_handlers.path_handler.methodMaskFromMethods.html">methodMaskFromMethods</a><div class="simplified-prototype" style="max-width: 55ch;"><tt class="highlighted"><span class="type">ushort</span></tt> <span class="name">methodMaskFromMethods</span>(HttpMethod[] methods)</div></dt><dd><div><p>Computes a bitmask from a list of HTTP methods.</p></div></dd></dl><h3 class="member-list-header hide-from-toc" id="struct"><a class="header-anchor" href="#struct">Structs</a></h3><dl class="member-list native"><dt><a href="handy_http_handlers.path_handler.DeleteMapping.html">DeleteMapping</a><div class="simplified-prototype" style="max-width: 22ch;"><span class="builtin-type">struct</span> <span class="name">DeleteMapping</span></div></dt><dd><div><p>A simplified version of <tt class="inline-code">PathMapping</tt> for HTTP DELETE mappings only.</p></div></dd><dt><a href="handy_http_handlers.path_handler.GetMapping.html">GetMapping</a><div class="simplified-prototype" style="max-width: 18ch;"><span class="builtin-type">struct</span> <span class="name">GetMapping</span></div></dt><dd><div><p>A simplified version of <tt class="inline-code">PathMapping</tt> for HTTP GET mappings only.</p></div></dd><dt><a href="handy_http_handlers.path_handler.PatchMapping.html">PatchMapping</a><div class="simplified-prototype" style="max-width: 20ch;"><span class="builtin-type">struct</span> <span class="name">PatchMapping</span></div></dt><dd><div><p>A simplified version of <tt class="inline-code">PathMapping</tt> for HTTP PATCH mappings only.</p></div></dd><dt><a href="handy_http_handlers.path_handler.PathMapping.html">PathMapping</a><div class="simplified-prototype" style="max-width: 19ch;"><span class="builtin-type">struct</span> <span class="name">PathMapping</span></div></dt><dd><div><p>A user-defined attribute that, when added to a function, allows that
|
|
function to be registered automatically by a path handler when you call
|
|
its <tt class="inline-code">registerHandlers</tt> method on the module containing the function.</p></div></dd><dt><a href="handy_http_handlers.path_handler.PostMapping.html">PostMapping</a><div class="simplified-prototype" style="max-width: 19ch;"><span class="builtin-type">struct</span> <span class="name">PostMapping</span></div></dt><dd><div><p>A simplified version of <tt class="inline-code">PathMapping</tt> for HTTP POST mappings only.</p></div></dd><dt><a href="handy_http_handlers.path_handler.PutMapping.html">PutMapping</a><div class="simplified-prototype" style="max-width: 18ch;"><span class="builtin-type">struct</span> <span class="name">PutMapping</span></div></dt><dd><div><p>A simplified version of <tt class="inline-code">PathMapping</tt> for HTTP PUT mappings only.</p></div></dd></dl><div></div></div>
|
|
<div id="page-nav"><a class="parent" href="handy_http_handlers.html">handy_http_handlers</a>
|
|
<span class="type-separator">modules</span><ul><li><a class="module" href="handy_http_handlers.filtered_handler.html">filtered_handler</a></li><li><a class="module current" href="handy_http_handlers.path_handler.html">path_handler</a></li><li><a class="module" href="handy_http_handlers.path_handler_sample_module.html">path_handler_sample_module</a></li></ul></div>
|
|
</div>
|
|
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
|
|
</body>
|
|
</html> |