3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>http::response_parser</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__response_header.html" title="http::response_header">
10 <link rel="next" href="boost__beast__http__response_serializer.html" title="http::response_serializer">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="boost__beast__http__response_header.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_serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="beast.ref.boost__beast__http__response_parser"></a><a class="link" href="boost__beast__http__response_parser.html" title="http::response_parser">http::response_parser</a>
28 </h4></div></div></div>
30 <a class="indexterm" name="idm45873491152016"></a>
31 An HTTP/1 parser for producing a response message.
34 <a name="beast.ref.boost__beast__http__response_parser.h0"></a>
35 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.synopsis"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.synopsis">Synopsis</a>
38 Defined in header <code class="literal"><<a href="../../../../../../boost/beast/http/parser.hpp" target="_top">boost/beast/http/parser.hpp</a>></code>
40 <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
41 <span class="keyword">class</span> <a class="link" href="../concepts/Body.html" title="Body"><span class="emphasis"><em>Body</em></span></a><span class="special">,</span>
42 <span class="keyword">class</span> <a href="https://en.cppreference.com/w/cpp/named_req/Allocator" target="_top"><span class="emphasis"><em>Allocator</em></span></a> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special"><</span><span class="keyword">char</span><span class="special">>></span>
43 <span class="keyword">using</span> <span class="identifier">response_parser</span> <span class="special">=</span> <span class="identifier">parser</span><span class="special"><</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">Body</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">>;</span>
46 <a name="beast.ref.boost__beast__http__response_parser.h1"></a>
47 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.types"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.types">Types</a>
49 <div class="informaltable"><table class="table">
70 <a class="link" href="boost__beast__http__parser/is_request.html" title="http::parser::is_request"><span class="bold"><strong>is_request</strong></span></a>
75 true if this parser parses requests, false for responses.
82 <a class="link" href="boost__beast__http__parser/value_type.html" title="http::parser::value_type"><span class="bold"><strong>value_type</strong></span></a>
87 The type of message returned by the parser.
94 <a name="beast.ref.boost__beast__http__response_parser.h2"></a>
95 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.member_functions"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.member_functions">Member
98 <div class="informaltable"><table class="table">
119 <a class="link" href="boost__beast__http__parser/body_limit.html" title="http::parser::body_limit"><span class="bold"><strong>body_limit</strong></span></a>
124 Set the limit on the payload body.
131 <a class="link" href="boost__beast__http__parser/chunked.html" title="http::parser::chunked"><span class="bold"><strong>chunked</strong></span></a>
136 Returns true if the last value for Transfer-Encoding is "chunked".
143 <a class="link" href="boost__beast__http__parser/content_length.html" title="http::parser::content_length"><span class="bold"><strong>content_length</strong></span></a>
148 Returns the optional value of Content-Length if known.
155 <a class="link" href="boost__beast__http__parser/content_length_remaining.html" title="http::parser::content_length_remaining"><span class="bold"><strong>content_length_remaining</strong></span></a>
160 Returns the remaining content length if known.
167 <a class="link" href="boost__beast__http__parser/eager.html" title="http::parser::eager"><span class="bold"><strong>eager</strong></span></a>
172 Returns true if the eager parse option is set.
175 Set the eager parse option.
182 <a class="link" href="boost__beast__http__parser/get.html" title="http::parser::get"><span class="bold"><strong>get</strong></span></a>
187 Returns the parsed message.
194 <a class="link" href="boost__beast__http__parser/got_some.html" title="http::parser::got_some"><span class="bold"><strong>got_some</strong></span></a>
199 Returns true if the parser has received at least one byte of input.
206 <a class="link" href="boost__beast__http__parser/header_limit.html" title="http::parser::header_limit"><span class="bold"><strong>header_limit</strong></span></a>
211 Set a limit on the total size of the header.
218 <a class="link" href="boost__beast__http__parser/is_done.html" title="http::parser::is_done"><span class="bold"><strong>is_done</strong></span></a>
223 Returns true if the message is complete.
230 <a class="link" href="boost__beast__http__parser/is_header_done.html" title="http::parser::is_header_done"><span class="bold"><strong>is_header_done</strong></span></a>
235 Returns true if a the parser has produced the full header.
242 <a class="link" href="boost__beast__http__parser/keep_alive.html" title="http::parser::keep_alive"><span class="bold"><strong>keep_alive</strong></span></a>
247 Returns true if the message has keep-alive connection semantics.
254 <a class="link" href="boost__beast__http__parser/need_eof.html" title="http::parser::need_eof"><span class="bold"><strong>need_eof</strong></span></a>
259 Returns true if the message semantics require an end of file.
266 <a class="link" href="boost__beast__http__parser/on_chunk_body.html" title="http::parser::on_chunk_body"><span class="bold"><strong>on_chunk_body</strong></span></a>
271 Set a callback to be invoked on chunk body data.
278 <a class="link" href="boost__beast__http__parser/on_chunk_header.html" title="http::parser::on_chunk_header"><span class="bold"><strong>on_chunk_header</strong></span></a>
283 Set a callback to be invoked on each chunk header.
290 <a class="link" href="boost__beast__http__parser/operator_eq_.html" title="http::parser::operator="><span class="bold"><strong>operator=</strong></span></a>
295 Assignment (disallowed)
302 <a class="link" href="boost__beast__http__parser/parser.html" title="http::parser::parser"><span class="bold"><strong>parser</strong></span></a>
307 Constructor (disallowed)
313 Construct a parser from another parser, changing the Body type.
320 <a class="link" href="boost__beast__http__parser/put.html" title="http::parser::put"><span class="bold"><strong>put</strong></span></a>
325 Write a buffer sequence to the parser.
332 <a class="link" href="boost__beast__http__parser/put_eof.html" title="http::parser::put_eof"><span class="bold"><strong>put_eof</strong></span></a>
337 Inform the parser that the end of stream was reached.
344 <a class="link" href="boost__beast__http__parser/release.html" title="http::parser::release"><span class="bold"><strong>release</strong></span></a>
349 Returns ownership of the parsed message.
356 <a class="link" href="boost__beast__http__parser/skip.html" title="http::parser::skip"><span class="bold"><strong>skip</strong></span></a>
361 Returns true if the skip parse option is set.
364 Set the skip parse option.
371 <a class="link" href="boost__beast__http__parser/upgrade.html" title="http::parser::upgrade"><span class="bold"><strong>upgrade</strong></span></a>
376 Returns true if the message is an upgrade message.
383 <a class="link" href="boost__beast__http__parser/parser_dtor_.html" title="http::parser::~parser"><span class="bold"><strong>~parser</strong></span></a>
395 This class uses the basic HTTP/1 wire format parser to convert a series of
396 octets into a <a class="link" href="boost__beast__http__message.html" title="http::message"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">message</span></code></a> using the <a class="link" href="boost__beast__http__basic_fields.html" title="http::basic_fields"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">basic_fields</span></code></a> container to represent
400 <a name="beast.ref.boost__beast__http__response_parser.h3"></a>
401 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.template_parameters"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.template_parameters">Template
404 <div class="informaltable"><table class="table">
425 <code class="computeroutput"><span class="identifier">isRequest</span></code>
430 Indicates whether a request or response will be parsed.
437 <code class="computeroutput"><span class="identifier">Body</span></code>
442 The type used to represent the body. This must meet the requirements
443 of <span class="emphasis"><em>Body</em></span>.
450 <code class="computeroutput"><span class="identifier">Allocator</span></code>
455 The type of allocator used with the <a class="link" href="boost__beast__http__basic_fields.html" title="http::basic_fields"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">basic_fields</span></code></a> container.
462 <a name="beast.ref.boost__beast__http__response_parser.h4"></a>
463 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.remarks"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.remarks">Remarks</a>
466 A new instance of the parser is required for each message.
469 <a name="beast.ref.boost__beast__http__response_parser.h5"></a>
470 <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.description"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.description">Description</a>
473 Convenience header <code class="literal"><<a href="../../../../../../boost/beast/http.hpp" target="_top">boost/beast/http.hpp</a>></code>
476 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
477 <td align="left"></td>
478 <td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
480 Distributed under the Boost Software License, Version 1.0. (See accompanying
481 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>)
486 <div class="spirit-nav">
487 <a accesskey="p" href="boost__beast__http__response_header.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_serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>