3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>http::fields</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__field.html" title="http::field">
10 <link rel="next" href="boost__beast__http__file_body.html" title="http::file_body">
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__field.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__file_body.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__fields"></a><a class="link" href="boost__beast__http__fields.html" title="http::fields">http::fields</a>
28 </h4></div></div></div>
30 <a class="indexterm" name="idm45873498704080"></a>
31 A typical HTTP header fields container.
34 <a name="beast.ref.boost__beast__http__fields.h0"></a>
35 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.synopsis"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.synopsis">Synopsis</a>
38 Defined in header <code class="literal"><<a href="../../../../../../boost/beast/http/fields.hpp" target="_top">boost/beast/http/fields.hpp</a>></code>
40 <pre class="programlisting"><span class="keyword">using</span> <span class="identifier">fields</span> <span class="special">=</span> <span class="identifier">basic_fields</span><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> <span class="special">>;</span>
43 <a name="beast.ref.boost__beast__http__fields.h1"></a>
44 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.types"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.types">Types</a>
46 <div class="informaltable"><table class="table">
67 <a class="link" href="boost__beast__http__basic_fields/allocator_type.html" title="http::basic_fields::allocator_type"><span class="bold"><strong>allocator_type</strong></span></a>
72 The type of allocator used.
79 <a class="link" href="boost__beast__http__basic_fields__value_type.html" title="http::basic_fields::value_type"><span class="bold"><strong>value_type</strong></span></a>
84 The type of element used to represent a field.
91 <a class="link" href="boost__beast__http__basic_fields/const_iterator.html" title="http::basic_fields::const_iterator"><span class="bold"><strong>const_iterator</strong></span></a>
96 A constant iterator to the field sequence.
103 <a class="link" href="boost__beast__http__basic_fields/iterator.html" title="http::basic_fields::iterator"><span class="bold"><strong>iterator</strong></span></a>
108 A constant iterator to the field sequence.
115 <a class="link" href="boost__beast__http__basic_fields/key_compare.html" title="http::basic_fields::key_compare"><span class="bold"><strong>key_compare</strong></span></a>
120 A strictly less predicate for comparing keys, using a case-insensitive
128 <a class="link" href="boost__beast__http__basic_fields/writer.html" title="http::basic_fields::writer"><span class="bold"><strong>writer</strong></span></a>
133 The algorithm used to serialize the header.
140 <a name="beast.ref.boost__beast__http__fields.h2"></a>
141 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.member_functions"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.member_functions">Member Functions</a>
143 <div class="informaltable"><table class="table">
164 <a class="link" href="boost__beast__http__basic_fields/at.html" title="http::basic_fields::at"><span class="bold"><strong>at</strong></span></a>
169 Returns the value for a field, or throws an exception.
176 <a class="link" href="boost__beast__http__basic_fields/basic_fields.html" title="http::basic_fields::basic_fields"><span class="bold"><strong>basic_fields</strong></span></a>
194 <a class="link" href="boost__beast__http__basic_fields/begin.html" title="http::basic_fields::begin"><span class="bold"><strong>begin</strong></span></a>
199 Return a const iterator to the beginning of the field sequence.
206 <a class="link" href="boost__beast__http__basic_fields/cbegin.html" title="http::basic_fields::cbegin"><span class="bold"><strong>cbegin</strong></span></a>
211 Return a const iterator to the beginning of the field sequence.
218 <a class="link" href="boost__beast__http__basic_fields/cend.html" title="http::basic_fields::cend"><span class="bold"><strong>cend</strong></span></a>
223 Return a const iterator to the end of the field sequence.
230 <a class="link" href="boost__beast__http__basic_fields/clear.html" title="http::basic_fields::clear"><span class="bold"><strong>clear</strong></span></a>
235 Remove all fields from the container.
242 <a class="link" href="boost__beast__http__basic_fields/count.html" title="http::basic_fields::count"><span class="bold"><strong>count</strong></span></a>
247 Return the number of fields with the specified name.
254 <a class="link" href="boost__beast__http__basic_fields/end.html" title="http::basic_fields::end"><span class="bold"><strong>end</strong></span></a>
259 Return a const iterator to the end of the field sequence.
266 <a class="link" href="boost__beast__http__basic_fields/equal_range.html" title="http::basic_fields::equal_range"><span class="bold"><strong>equal_range</strong></span></a>
271 Returns a range of iterators to the fields with the specified name.
278 <a class="link" href="boost__beast__http__basic_fields/erase.html" title="http::basic_fields::erase"><span class="bold"><strong>erase</strong></span></a>
286 Remove all fields with the specified name.
293 <a class="link" href="boost__beast__http__basic_fields/find.html" title="http::basic_fields::find"><span class="bold"><strong>find</strong></span></a>
298 Returns an iterator to the case-insensitive matching field.
301 Returns an iterator to the case-insensitive matching field name.
308 <a class="link" href="boost__beast__http__basic_fields/get_allocator.html" title="http::basic_fields::get_allocator"><span class="bold"><strong>get_allocator</strong></span></a>
313 Return a copy of the allocator associated with the container.
320 <a class="link" href="boost__beast__http__basic_fields/insert.html" title="http::basic_fields::insert"><span class="bold"><strong>insert</strong></span></a>
332 <a class="link" href="boost__beast__http__basic_fields/key_comp.html" title="http::basic_fields::key_comp"><span class="bold"><strong>key_comp</strong></span></a>
337 Returns a copy of the key comparison function.
344 <a class="link" href="boost__beast__http__basic_fields/operator_eq_.html" title="http::basic_fields::operator="><span class="bold"><strong>operator=</strong></span></a>
359 <a class="link" href="boost__beast__http__basic_fields/operator_lb__rb_.html" title="http::basic_fields::operator[]"><span class="bold"><strong>operator[]</strong></span></a>
364 Returns the value for a field, or "" if it does not exist.
367 Returns the value for a case-insensitive matching header, or ""
368 if it does not exist.
375 <a class="link" href="boost__beast__http__basic_fields/set.html" title="http::basic_fields::set"><span class="bold"><strong>set</strong></span></a>
380 Set a field value, removing any other instances of that field.
387 <a class="link" href="boost__beast__http__basic_fields/swap.html" title="http::basic_fields::swap"><span class="bold"><strong>swap</strong></span></a>
392 Return a buffer sequence representing the trailers.
399 <a class="link" href="boost__beast__http__basic_fields/basic_fields_dtor_.html" title="http::basic_fields::~basic_fields"><span class="bold"><strong>~basic_fields</strong></span></a>
411 <a name="beast.ref.boost__beast__http__fields.h3"></a>
412 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.protected_member_functions"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.protected_member_functions">Protected
415 <div class="informaltable"><table class="table">
436 <a class="link" href="boost__beast__http__basic_fields/get_chunked_impl.html" title="http::basic_fields::get_chunked_impl"><span class="bold"><strong>get_chunked_impl</strong></span></a>
441 Returns the chunked Transfer-Encoding setting.
448 <a class="link" href="boost__beast__http__basic_fields/get_keep_alive_impl.html" title="http::basic_fields::get_keep_alive_impl"><span class="bold"><strong>get_keep_alive_impl</strong></span></a>
453 Returns the keep-alive setting.
460 <a class="link" href="boost__beast__http__basic_fields/get_method_impl.html" title="http::basic_fields::get_method_impl"><span class="bold"><strong>get_method_impl</strong></span></a>
465 Returns the request-method string.
472 <a class="link" href="boost__beast__http__basic_fields/get_reason_impl.html" title="http::basic_fields::get_reason_impl"><span class="bold"><strong>get_reason_impl</strong></span></a>
477 Returns the response reason-phrase string.
484 <a class="link" href="boost__beast__http__basic_fields/get_target_impl.html" title="http::basic_fields::get_target_impl"><span class="bold"><strong>get_target_impl</strong></span></a>
489 Returns the request-target string.
496 <a class="link" href="boost__beast__http__basic_fields/has_content_length_impl.html" title="http::basic_fields::has_content_length_impl"><span class="bold"><strong>has_content_length_impl</strong></span></a>
501 Returns true if the Content-Length field is present.
508 <a class="link" href="boost__beast__http__basic_fields/set_chunked_impl.html" title="http::basic_fields::set_chunked_impl"><span class="bold"><strong>set_chunked_impl</strong></span></a>
513 Adjusts the chunked Transfer-Encoding value.
520 <a class="link" href="boost__beast__http__basic_fields/set_content_length_impl.html" title="http::basic_fields::set_content_length_impl"><span class="bold"><strong>set_content_length_impl</strong></span></a>
525 Sets or clears the Content-Length field.
532 <a class="link" href="boost__beast__http__basic_fields/set_keep_alive_impl.html" title="http::basic_fields::set_keep_alive_impl"><span class="bold"><strong>set_keep_alive_impl</strong></span></a>
537 Adjusts the Connection field.
544 <a class="link" href="boost__beast__http__basic_fields/set_method_impl.html" title="http::basic_fields::set_method_impl"><span class="bold"><strong>set_method_impl</strong></span></a>
549 Set or clear the method string.
556 <a class="link" href="boost__beast__http__basic_fields/set_reason_impl.html" title="http::basic_fields::set_reason_impl"><span class="bold"><strong>set_reason_impl</strong></span></a>
561 Set or clear the reason string.
568 <a class="link" href="boost__beast__http__basic_fields/set_target_impl.html" title="http::basic_fields::set_target_impl"><span class="bold"><strong>set_target_impl</strong></span></a>
573 Set or clear the target string.
580 <a name="beast.ref.boost__beast__http__fields.h4"></a>
581 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.friends"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.friends">Friends</a>
583 <div class="informaltable"><table class="table">
603 <a class="link" href="boost__beast__http__basic_fields/swap.html" title="http::basic_fields::swap"><span class="bold"><strong>swap</strong></span></a>
608 Swap two field containers.
614 This container is designed to store the field value pairs that make up the
615 fields and trailers in an HTTP message. Objects of this type are iterable,
616 with each element holding the field name and field value. Field names are
617 stored as-is, but comparisons are case-insensitive. The container behaves
618 as a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">multiset</span></code>; there will be a separate value
619 for each occurrence of the same field name. When the container is iterated
620 the fields are presented in the order of insertion, with fields having the
621 same name following each other consecutively. Meets the requirements of
622 <span class="emphasis"><em>Fields</em></span>
625 <a name="beast.ref.boost__beast__http__fields.h5"></a>
626 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.template_parameters"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.template_parameters">Template
629 <div class="informaltable"><table class="table">
649 <code class="computeroutput"><span class="identifier">Allocator</span></code>
654 The allocator to use.
660 <a name="beast.ref.boost__beast__http__fields.h6"></a>
661 <span class="phrase"><a name="beast.ref.boost__beast__http__fields.description"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.description">Description</a>
664 Convenience header <code class="literal"><<a href="../../../../../../boost/beast/http.hpp" target="_top">boost/beast/http.hpp</a>></code>
667 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
668 <td align="left"></td>
669 <td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
671 Distributed under the Boost Software License, Version 1.0. (See accompanying
672 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>)
677 <div class="spirit-nav">
678 <a accesskey="p" href="boost__beast__http__field.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__file_body.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>