1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>http::request_header</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast"> 8<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2"> 9<link rel="prev" href="boost__beast__http__file_body.html" title="http::file_body"> 10<link rel="next" href="boost__beast__http__response_header.html" title="http::response_header"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__response_header.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="beast.ref.boost__beast__http__request_header"></a><a class="link" href="boost__beast__http__request_header.html" title="http::request_header">http::request_header</a> 28</h4></div></div></div> 29<p> 30 <a class="indexterm" name="idm46057508734208"></a> 31 </p> 32<p> 33 A typical HTTP request header. 34 </p> 35<h5> 36<a name="beast.ref.boost__beast__http__request_header.h0"></a> 37 <span class="phrase"><a name="beast.ref.boost__beast__http__request_header.synopsis"></a></span><a class="link" href="boost__beast__http__request_header.html#beast.ref.boost__beast__http__request_header.synopsis">Synopsis</a> 38 </h5> 39<p> 40 Defined in header <code class="literal"><<a href="../../../../../../boost/beast/http/message.hpp" target="_top">boost/beast/http/message.hpp</a>></code> 41 </p> 42<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> 43 <span class="keyword">class</span> <a class="link" href="../concepts/Fields.html" title="Fields"><span class="emphasis"><em>Fields</em></span></a> <span class="special">=</span> <span class="identifier">fields</span><span class="special">></span> 44<span class="keyword">using</span> <span class="identifier">request_header</span> <span class="special">=</span> <span class="identifier">header</span><span class="special"><</span> <span class="keyword">true</span><span class="special">,</span> <span class="identifier">Fields</span> <span class="special">>;</span> 45</pre> 46<h5> 47<a name="beast.ref.boost__beast__http__request_header.h1"></a> 48 <span class="phrase"><a name="beast.ref.boost__beast__http__request_header.types"></a></span><a class="link" href="boost__beast__http__request_header.html#beast.ref.boost__beast__http__request_header.types">Types</a> 49 </h5> 50<div class="informaltable"><table class="table"> 51<colgroup> 52<col> 53<col> 54</colgroup> 55<thead><tr> 56<th> 57 <p> 58 Name 59 </p> 60 </th> 61<th> 62 <p> 63 Description 64 </p> 65 </th> 66</tr></thead> 67<tbody> 68<tr> 69<td> 70 <p> 71 <span class="bold"><strong><a class="link" href="boost__beast__http__header/fields_type.html" title="http::header::fields_type">fields_type</a></strong></span> 72 </p> 73 </td> 74<td> 75 <p> 76 The type representing the fields. 77 </p> 78 </td> 79</tr> 80<tr> 81<td> 82 <p> 83 <span class="bold"><strong><a class="link" href="boost__beast__http__header/is_request.html" title="http::header::is_request">is_request</a></strong></span> 84 </p> 85 </td> 86<td> 87 <p> 88 Indicates if the header is a request or response. 89 </p> 90 </td> 91</tr> 92</tbody> 93</table></div> 94<h5> 95<a name="beast.ref.boost__beast__http__request_header.h2"></a> 96 <span class="phrase"><a name="beast.ref.boost__beast__http__request_header.member_functions"></a></span><a class="link" href="boost__beast__http__request_header.html#beast.ref.boost__beast__http__request_header.member_functions">Member 97 Functions</a> 98 </h5> 99<div class="informaltable"><table class="table"> 100<colgroup> 101<col> 102<col> 103</colgroup> 104<thead><tr> 105<th> 106 <p> 107 Name 108 </p> 109 </th> 110<th> 111 <p> 112 Description 113 </p> 114 </th> 115</tr></thead> 116<tbody> 117<tr> 118<td> 119 <p> 120 <span class="bold"><strong><a class="link" href="boost__beast__http__header/header.html" title="http::header::header">header</a></strong></span> 121 </p> 122 </td> 123<td> 124 <p> 125 Constructor. 126 </p> 127 </td> 128</tr> 129<tr> 130<td> 131 <p> 132 <span class="bold"><strong><a class="link" href="boost__beast__http__header/method.html" title="http::header::method">method</a></strong></span> 133 </p> 134 </td> 135<td> 136 <p> 137 Return the request-method verb. 138 </p> 139 <p> 140 Set the request-method. 141 </p> 142 </td> 143</tr> 144<tr> 145<td> 146 <p> 147 <span class="bold"><strong><a class="link" href="boost__beast__http__header/method_string.html" title="http::header::method_string">method_string</a></strong></span> 148 </p> 149 </td> 150<td> 151 <p> 152 Return the request-method as a string. 153 </p> 154 <p> 155 Set the request-method. 156 </p> 157 </td> 158</tr> 159<tr> 160<td> 161 <p> 162 <span class="bold"><strong><a class="link" href="boost__beast__http__header/operator_eq_.html" title="http::header::operator=">operator=</a></strong></span> 163 </p> 164 </td> 165<td> 166 <p> 167 Assignment. 168 </p> 169 </td> 170</tr> 171<tr> 172<td> 173 <p> 174 <span class="bold"><strong><a class="link" href="boost__beast__http__header/reason.html" title="http::header::reason">reason</a></strong></span> 175 </p> 176 </td> 177<td> 178 <p> 179 Return the response reason-phrase. 180 </p> 181 <p> 182 Set the response reason-phrase (deprecated) 183 </p> 184 </td> 185</tr> 186<tr> 187<td> 188 <p> 189 <span class="bold"><strong><a class="link" href="boost__beast__http__header/result.html" title="http::header::result">result</a></strong></span> 190 </p> 191 </td> 192<td> 193 <p> 194 The response status-code result. 195 </p> 196 <p> 197 Set the response status-code. 198 </p> 199 <p> 200 Set the response status-code as an integer. 201 </p> 202 </td> 203</tr> 204<tr> 205<td> 206 <p> 207 <span class="bold"><strong><a class="link" href="boost__beast__http__header/result_int.html" title="http::header::result_int">result_int</a></strong></span> 208 </p> 209 </td> 210<td> 211 <p> 212 The response status-code expressed as an integer. 213 </p> 214 </td> 215</tr> 216<tr> 217<td> 218 <p> 219 <span class="bold"><strong><a class="link" href="boost__beast__http__header/target.html" title="http::header::target">target</a></strong></span> 220 </p> 221 </td> 222<td> 223 <p> 224 Returns the request-target string. 225 </p> 226 <p> 227 Set the request-target string. 228 </p> 229 </td> 230</tr> 231<tr> 232<td> 233 <p> 234 <span class="bold"><strong><a class="link" href="boost__beast__http__header/version.html" title="http::header::version">version</a></strong></span> 235 </p> 236 </td> 237<td> 238 <p> 239 Return the HTTP-version. 240 </p> 241 <p> 242 Set the HTTP-version. 243 </p> 244 </td> 245</tr> 246</tbody> 247</table></div> 248<p> 249 This container is derived from the <code class="computeroutput"><span class="identifier">Fields</span></code> 250 template type. To understand all of the members of this class it is necessary 251 to view the declaration for the <code class="computeroutput"><span class="identifier">Fields</span></code> 252 type. When using the default fields container, those declarations are in 253 <a class="link" href="boost__beast__http__fields.html" title="http::fields"><code class="computeroutput"><span class="identifier">fields</span></code></a>. 254 Newly constructed header objects have version set to HTTP/1.1. Newly constructed 255 response objects also have result code set to <a class="link" href="boost__beast__http__status.html" title="http::status"><code class="computeroutput"><span class="identifier">status</span><span class="special">::</span><span class="identifier">ok</span></code></a>. A <code class="computeroutput"><span class="identifier">header</span></code> 256 includes the start-line and header-fields. 257 </p> 258<h5> 259<a name="beast.ref.boost__beast__http__request_header.h3"></a> 260 <span class="phrase"><a name="beast.ref.boost__beast__http__request_header.description"></a></span><a class="link" href="boost__beast__http__request_header.html#beast.ref.boost__beast__http__request_header.description">Description</a> 261 </h5> 262</div> 263<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 264<td align="left"></td> 265<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie 266 Falco<p> 267 Distributed under the Boost Software License, Version 1.0. (See accompanying 268 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 269 </p> 270</div></td> 271</tr></table> 272<hr> 273<div class="spirit-nav"> 274<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__response_header.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 275</div> 276</body> 277</html> 278