website/docs/ddoc/data/handy_http_data.json.html

38 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>handy_http_data.json (handy_http_data.json)</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_data.json</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_data.html">handy_http_data</a> </div><div><div class="documentation-comment synopsis"><div><p>Defines functions to read and write JSON values when handling HTTP requests.</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="function"><a class="header-anchor" href="#function">Functions</a></h3><dl class="member-list native"><dt><a href="handy_http_data.json.readJsonBodyAs.html">readJsonBodyAs</a><div class="simplified-prototype" style="max-width: 47ch;"><tt class="highlighted"><span class="hid">T</span></tt> <span class="name">readJsonBodyAs</span>(ServerHttpRequest request)</div></dt><dd><div><p>Reads a JSON value from the body of the given HTTP request, parsing it using
the ASDF library according to the template type T.</p></div></dd><dt><a href="handy_http_data.json.writeJsonBody.html">writeJsonBody</a><div class="simplified-prototype" style="max-width: 68ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">writeJsonBody</span>(ServerHttpResponse response, T bodyContent)</div></dt><dd><div><p>Writes a JSON value to the body of the given HTTP response, serializing it
using the ASDF library. Will also set Content-Type and Content-Length
headers before writing.</p></div></dd></dl><div></div></div>
<div id="page-nav"><a class="parent" href="handy_http_data.html">handy_http_data</a>
<span class="type-separator">modules</span><ul><li><a class="module current" href="handy_http_data.json.html">json</a></li><li><a class="module" href="handy_http_data.multipart.html">multipart</a></li><li><a class="module" href="handy_http_data.xml.html">xml</a></li></ul></div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>