Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / beast / doc / html / beast / ref / boost__beast__http__fields.html
1 <html>
2 <head>
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&#160;1.&#160;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">
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__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>
24 </div>
25 <div class="section">
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>
29 <p>
30         <a class="indexterm" name="idm45873498704080"></a>
31 A typical HTTP header fields container.
32       </p>
33 <h5>
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>
36       </h5>
37 <p>
38         Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/fields.hpp" target="_top">boost/beast/http/fields.hpp</a>&gt;</code>
39       </p>
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">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span> <span class="keyword">char</span> <span class="special">&gt;</span> <span class="special">&gt;;</span>
41 </pre>
42 <h5>
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>
45       </h5>
46 <div class="informaltable"><table class="table">
47 <colgroup>
48 <col>
49 <col>
50 </colgroup>
51 <thead><tr>
52 <th>
53                 <p>
54                   Name
55                 </p>
56               </th>
57 <th>
58                 <p>
59                   Description
60                 </p>
61               </th>
62 </tr></thead>
63 <tbody>
64 <tr>
65 <td>
66                 <p>
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>
68                 </p>
69               </td>
70 <td>
71                 <p>
72                   The type of allocator used.
73                 </p>
74               </td>
75 </tr>
76 <tr>
77 <td>
78                 <p>
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>
80                 </p>
81               </td>
82 <td>
83                 <p>
84                   The type of element used to represent a field.
85                 </p>
86               </td>
87 </tr>
88 <tr>
89 <td>
90                 <p>
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>
92                 </p>
93               </td>
94 <td>
95                 <p>
96                   A constant iterator to the field sequence.
97                 </p>
98               </td>
99 </tr>
100 <tr>
101 <td>
102                 <p>
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>
104                 </p>
105               </td>
106 <td>
107                 <p>
108                   A constant iterator to the field sequence.
109                 </p>
110               </td>
111 </tr>
112 <tr>
113 <td>
114                 <p>
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>
116                 </p>
117               </td>
118 <td>
119                 <p>
120                   A strictly less predicate for comparing keys, using a case-insensitive
121                   comparison.
122                 </p>
123               </td>
124 </tr>
125 <tr>
126 <td>
127                 <p>
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>
129                 </p>
130               </td>
131 <td>
132                 <p>
133                   The algorithm used to serialize the header.
134                 </p>
135               </td>
136 </tr>
137 </tbody>
138 </table></div>
139 <h5>
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>
142       </h5>
143 <div class="informaltable"><table class="table">
144 <colgroup>
145 <col>
146 <col>
147 </colgroup>
148 <thead><tr>
149 <th>
150                 <p>
151                   Name
152                 </p>
153               </th>
154 <th>
155                 <p>
156                   Description
157                 </p>
158               </th>
159 </tr></thead>
160 <tbody>
161 <tr>
162 <td>
163                 <p>
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>
165                 </p>
166               </td>
167 <td>
168                 <p>
169                   Returns the value for a field, or throws an exception.
170                 </p>
171               </td>
172 </tr>
173 <tr>
174 <td>
175                 <p>
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>
177                 </p>
178               </td>
179 <td>
180                 <p>
181                   Constructor.
182                 </p>
183                 <p>
184                   Move constructor.
185                 </p>
186                 <p>
187                   Copy constructor.
188                 </p>
189               </td>
190 </tr>
191 <tr>
192 <td>
193                 <p>
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>
195                 </p>
196               </td>
197 <td>
198                 <p>
199                   Return a const iterator to the beginning of the field sequence.
200                 </p>
201               </td>
202 </tr>
203 <tr>
204 <td>
205                 <p>
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>
207                 </p>
208               </td>
209 <td>
210                 <p>
211                   Return a const iterator to the beginning of the field sequence.
212                 </p>
213               </td>
214 </tr>
215 <tr>
216 <td>
217                 <p>
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>
219                 </p>
220               </td>
221 <td>
222                 <p>
223                   Return a const iterator to the end of the field sequence.
224                 </p>
225               </td>
226 </tr>
227 <tr>
228 <td>
229                 <p>
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>
231                 </p>
232               </td>
233 <td>
234                 <p>
235                   Remove all fields from the container.
236                 </p>
237               </td>
238 </tr>
239 <tr>
240 <td>
241                 <p>
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>
243                 </p>
244               </td>
245 <td>
246                 <p>
247                   Return the number of fields with the specified name.
248                 </p>
249               </td>
250 </tr>
251 <tr>
252 <td>
253                 <p>
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>
255                 </p>
256               </td>
257 <td>
258                 <p>
259                   Return a const iterator to the end of the field sequence.
260                 </p>
261               </td>
262 </tr>
263 <tr>
264 <td>
265                 <p>
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>
267                 </p>
268               </td>
269 <td>
270                 <p>
271                   Returns a range of iterators to the fields with the specified name.
272                 </p>
273               </td>
274 </tr>
275 <tr>
276 <td>
277                 <p>
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>
279                 </p>
280               </td>
281 <td>
282                 <p>
283                   Remove a field.
284                 </p>
285                 <p>
286                   Remove all fields with the specified name.
287                 </p>
288               </td>
289 </tr>
290 <tr>
291 <td>
292                 <p>
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>
294                 </p>
295               </td>
296 <td>
297                 <p>
298                   Returns an iterator to the case-insensitive matching field.
299                 </p>
300                 <p>
301                   Returns an iterator to the case-insensitive matching field name.
302                 </p>
303               </td>
304 </tr>
305 <tr>
306 <td>
307                 <p>
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>
309                 </p>
310               </td>
311 <td>
312                 <p>
313                   Return a copy of the allocator associated with the container.
314                 </p>
315               </td>
316 </tr>
317 <tr>
318 <td>
319                 <p>
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>
321                 </p>
322               </td>
323 <td>
324                 <p>
325                   Insert a field.
326                 </p>
327               </td>
328 </tr>
329 <tr>
330 <td>
331                 <p>
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>
333                 </p>
334               </td>
335 <td>
336                 <p>
337                   Returns a copy of the key comparison function.
338                 </p>
339               </td>
340 </tr>
341 <tr>
342 <td>
343                 <p>
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>
345                 </p>
346               </td>
347 <td>
348                 <p>
349                   Move assignment.
350                 </p>
351                 <p>
352                   Copy assignment.
353                 </p>
354               </td>
355 </tr>
356 <tr>
357 <td>
358                 <p>
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>
360                 </p>
361               </td>
362 <td>
363                 <p>
364                   Returns the value for a field, or "" if it does not exist.
365                 </p>
366                 <p>
367                   Returns the value for a case-insensitive matching header, or ""
368                   if it does not exist.
369                 </p>
370               </td>
371 </tr>
372 <tr>
373 <td>
374                 <p>
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>
376                 </p>
377               </td>
378 <td>
379                 <p>
380                   Set a field value, removing any other instances of that field.
381                 </p>
382               </td>
383 </tr>
384 <tr>
385 <td>
386                 <p>
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>
388                 </p>
389               </td>
390 <td>
391                 <p>
392                   Return a buffer sequence representing the trailers.
393                 </p>
394               </td>
395 </tr>
396 <tr>
397 <td>
398                 <p>
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>
400                 </p>
401               </td>
402 <td>
403                 <p>
404                   Destructor.
405                 </p>
406               </td>
407 </tr>
408 </tbody>
409 </table></div>
410 <h5>
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
413         Member Functions</a>
414       </h5>
415 <div class="informaltable"><table class="table">
416 <colgroup>
417 <col>
418 <col>
419 </colgroup>
420 <thead><tr>
421 <th>
422                 <p>
423                   Name
424                 </p>
425               </th>
426 <th>
427                 <p>
428                   Description
429                 </p>
430               </th>
431 </tr></thead>
432 <tbody>
433 <tr>
434 <td>
435                 <p>
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>
437                 </p>
438               </td>
439 <td>
440                 <p>
441                   Returns the chunked Transfer-Encoding setting.
442                 </p>
443               </td>
444 </tr>
445 <tr>
446 <td>
447                 <p>
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>
449                 </p>
450               </td>
451 <td>
452                 <p>
453                   Returns the keep-alive setting.
454                 </p>
455               </td>
456 </tr>
457 <tr>
458 <td>
459                 <p>
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>
461                 </p>
462               </td>
463 <td>
464                 <p>
465                   Returns the request-method string.
466                 </p>
467               </td>
468 </tr>
469 <tr>
470 <td>
471                 <p>
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>
473                 </p>
474               </td>
475 <td>
476                 <p>
477                   Returns the response reason-phrase string.
478                 </p>
479               </td>
480 </tr>
481 <tr>
482 <td>
483                 <p>
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>
485                 </p>
486               </td>
487 <td>
488                 <p>
489                   Returns the request-target string.
490                 </p>
491               </td>
492 </tr>
493 <tr>
494 <td>
495                 <p>
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>
497                 </p>
498               </td>
499 <td>
500                 <p>
501                   Returns true if the Content-Length field is present.
502                 </p>
503               </td>
504 </tr>
505 <tr>
506 <td>
507                 <p>
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>
509                 </p>
510               </td>
511 <td>
512                 <p>
513                   Adjusts the chunked Transfer-Encoding value.
514                 </p>
515               </td>
516 </tr>
517 <tr>
518 <td>
519                 <p>
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>
521                 </p>
522               </td>
523 <td>
524                 <p>
525                   Sets or clears the Content-Length field.
526                 </p>
527               </td>
528 </tr>
529 <tr>
530 <td>
531                 <p>
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>
533                 </p>
534               </td>
535 <td>
536                 <p>
537                   Adjusts the Connection field.
538                 </p>
539               </td>
540 </tr>
541 <tr>
542 <td>
543                 <p>
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>
545                 </p>
546               </td>
547 <td>
548                 <p>
549                   Set or clear the method string.
550                 </p>
551               </td>
552 </tr>
553 <tr>
554 <td>
555                 <p>
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>
557                 </p>
558               </td>
559 <td>
560                 <p>
561                   Set or clear the reason string.
562                 </p>
563               </td>
564 </tr>
565 <tr>
566 <td>
567                 <p>
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>
569                 </p>
570               </td>
571 <td>
572                 <p>
573                   Set or clear the target string.
574                 </p>
575               </td>
576 </tr>
577 </tbody>
578 </table></div>
579 <h5>
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>
582       </h5>
583 <div class="informaltable"><table class="table">
584 <colgroup>
585 <col>
586 <col>
587 </colgroup>
588 <thead><tr>
589 <th>
590                 <p>
591                   Name
592                 </p>
593               </th>
594 <th>
595                 <p>
596                   Description
597                 </p>
598               </th>
599 </tr></thead>
600 <tbody><tr>
601 <td>
602                 <p>
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>
604                 </p>
605               </td>
606 <td>
607                 <p>
608                   Swap two field containers.
609                 </p>
610               </td>
611 </tr></tbody>
612 </table></div>
613 <p>
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>
623       </p>
624 <h5>
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
627         Parameters</a>
628       </h5>
629 <div class="informaltable"><table class="table">
630 <colgroup>
631 <col>
632 <col>
633 </colgroup>
634 <thead><tr>
635 <th>
636                 <p>
637                   Type
638                 </p>
639               </th>
640 <th>
641                 <p>
642                   Description
643                 </p>
644               </th>
645 </tr></thead>
646 <tbody><tr>
647 <td>
648                 <p>
649                   <code class="computeroutput"><span class="identifier">Allocator</span></code>
650                 </p>
651               </td>
652 <td>
653                 <p>
654                   The allocator to use.
655                 </p>
656               </td>
657 </tr></tbody>
658 </table></div>
659 <h5>
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>
662       </h5>
663 <p>
664         Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/http.hpp" target="_top">boost/beast/http.hpp</a>&gt;</code>
665       </p>
666 </div>
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 &#169; 2016-2019 Vinnie
670       Falco<p>
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>)
673       </p>
674 </div></td>
675 </tr></table>
676 <hr>
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>
679 </div>
680 </body>
681 </html>