website/docs/ddoc/primitives/handy_http_primitives.respo...

36 lines
5.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>ServerHttpResponse (handy_http_primitives.response.ServerHttpResponse)</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>ServerHttpResponse</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_primitives.html">handy_http_primitives</a> <a class="breadcrumb" href="handy_http_primitives.response.html">response</a> </div><div><div class="documentation-comment synopsis"><div><p>The response that's sent by a server back to a client after processing the
client's HTTP request.</p></div></div></div><div class="annotated-prototype"><div class="aggregate-prototype"><div class="attributes"></div><span class="builtin-type">struct</span> ServerHttpResponse {<div class="aggregate-member"><a href="handy_http_primitives.response.ServerHttpResponse.status.html"><div class="attributes"></div><tt class="highlighted"><span class="hid">StatusInfo</span></tt> <span class="name">status</span>;</a></div><div class="aggregate-member"><a href="handy_http_primitives.response.ServerHttpResponse.headers.html"><div class="attributes"></div><tt class="highlighted"><span class="hid">StringMultiValueMap</span></tt> <span class="name">headers</span>;</a></div><div class="aggregate-member"><a href="handy_http_primitives.response.ServerHttpResponse.outputStream.html"><div class="attributes"></div><tt class="highlighted"><span class="hid">OutputStream</span>!<span class="type">ubyte</span></tt> <span class="name">outputStream</span>;</a></div><div class="aggregate-member"><a href="handy_http_primitives.response.ServerHttpResponse.writeBodyBytes.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">writeBodyBytes</span>(ubyte[] bytes, string contentType);</a></div><div class="aggregate-member"><a href="handy_http_primitives.response.ServerHttpResponse.writeBodyString.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">writeBodyString</span>(string content, string contentType);</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.response.ServerHttpResponse.writeBodyBytes.html">writeBodyBytes</a><div class="simplified-prototype" style="max-width: 59ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">writeBodyBytes</span>(ubyte[] bytes, string contentType)</div></dt><dd><div><p>Writes an array of bytes to the response's output stream.</p></div></dd><dt><a href="handy_http_primitives.response.ServerHttpResponse.writeBodyString.html">writeBodyString</a><div class="simplified-prototype" style="max-width: 61ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">writeBodyString</span>(string content, string contentType)</div></dt><dd><div><p>Writes a string of content to the response's output stream.</p></div></dd></dl><h3 class="member-list-header hide-from-toc" id="variable"><a class="header-anchor" href="#variable">Variables</a></h3><dl class="member-list native"><dt><a href="handy_http_primitives.response.ServerHttpResponse.headers.html">headers</a><div class="simplified-prototype" style="max-width: 30ch;"><tt class="highlighted"><span class="hid">StringMultiValueMap</span></tt> <span class="name">headers</span>;</div></dt><dd><div><p>A multi-valued map containing all headers.</p></div></dd><dt><a href="handy_http_primitives.response.ServerHttpResponse.outputStream.html">outputStream</a><div class="simplified-prototype" style="max-width: 35ch;"><tt class="highlighted"><span class="hid">OutputStream</span>!<span class="type">ubyte</span></tt> <span class="name">outputStream</span>;</div></dt><dd><div><p>The stream to which the response body is written.</p></div></dd><dt><a href="handy_http_primitives.response.ServerHttpResponse.status.html">status</a><div class="simplified-prototype" style="max-width: 19ch;"><tt class="highlighted"><span class="hid">StatusInfo</span></tt> <span class="name">status</span>;</div></dt><dd><div><p>The response status.</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.response.html">response</a>
<span class="type-separator">classes</span><ul><li><a class="class" href="handy_http_primitives.response.HttpStatusException.html">HttpStatusException</a></li></ul><span class="type-separator">enums</span><ul><li><a class="enum" href="handy_http_primitives.response.ContentTypes.html">ContentTypes</a></li><li><a class="enum" href="handy_http_primitives.response.HttpStatus.html">HttpStatus</a></li></ul><span class="type-separator">structs</span><ul><li><a class="struct current" href="handy_http_primitives.response.ServerHttpResponse.html">ServerHttpResponse</a></li><li><a class="struct" href="handy_http_primitives.response.StatusInfo.html">StatusInfo</a></li></ul></div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>