• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>http::basic_fields::insert (3 of 3 overloads)</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="../insert.html" title="http::basic_fields::insert">
9<link rel="prev" href="overload2.html" title="http::basic_fields::insert (2 of 3 overloads)">
10<link rel="next" href="../set.html" title="http::basic_fields::set">
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="overload2.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../insert.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="../set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h6 class="title">
27<a name="beast.ref.boost__beast__http__basic_fields.insert.overload3"></a><a class="link" href="overload3.html" title="http::basic_fields::insert (3 of 3 overloads)">http::basic_fields::insert
28          (3 of 3 overloads)</a>
29</h6></div></div></div>
30<p>
31            Insert a field.
32          </p>
33<h7><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.h0"></a>
34            <span class="phrase"><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.synopsis"></a></span><a class="link" href="overload3.html#beast.ref.boost__beast__http__basic_fields.insert.overload3.synopsis">Synopsis</a>
35          </h7><pre class="programlisting"><span class="keyword">void</span>
36<span class="identifier">insert</span><span class="special">(</span>
37    <span class="identifier">field</span> <span class="identifier">name</span><span class="special">,</span>
38    <span class="identifier">string_view</span> <span class="identifier">name_string</span><span class="special">,</span>
39    <span class="identifier">string_view</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">);</span>
40</pre>
41<h7><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.h1"></a>
42            <span class="phrase"><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.description"></a></span><a class="link" href="overload3.html#beast.ref.boost__beast__http__basic_fields.insert.overload3.description">Description</a>
43          </h7><p>
44            If one or more fields with the same name already exist, the new field
45            will be inserted after the last field with the matching name, in serialization
46            order.
47          </p>
48<h7><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.h2"></a>
49            <span class="phrase"><a name="beast.ref.boost__beast__http__basic_fields.insert.overload3.parameters"></a></span><a class="link" href="overload3.html#beast.ref.boost__beast__http__basic_fields.insert.overload3.parameters">Parameters</a>
50          </h7><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                      <code class="computeroutput"><span class="identifier">name</span></code>
72                    </p>
73                  </td>
74<td>
75                    <p>
76                      The field name.
77                    </p>
78                  </td>
79</tr>
80<tr>
81<td>
82                    <p>
83                      <code class="computeroutput"><span class="identifier">name_string</span></code>
84                    </p>
85                  </td>
86<td>
87                    <p>
88                      The literal text corresponding to the field name. If name !=
89                      <a class="link" href="../../boost__beast__http__field.html" title="http::field"><code class="computeroutput"><span class="identifier">field</span><span class="special">::</span><span class="identifier">unknown</span></code></a>, then this
90                      value must be equal to <code class="computeroutput"><span class="identifier">to_string</span><span class="special">(</span><span class="identifier">name</span><span class="special">)</span></code> using a case-insensitive comparison,
91                      otherwise the behavior is undefined.
92                    </p>
93                  </td>
94</tr>
95<tr>
96<td>
97                    <p>
98                      <code class="computeroutput"><span class="identifier">value</span></code>
99                    </p>
100                  </td>
101<td>
102                    <p>
103                      The value of the field, as a <a class="link" href="../../boost__beast__string_view.html" title="string_view"><code class="computeroutput"><span class="identifier">string_view</span></code></a>
104                    </p>
105                  </td>
106</tr>
107</tbody>
108</table></div>
109</div>
110<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
111<td align="left"></td>
112<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
113      Falco<p>
114        Distributed under the Boost Software License, Version 1.0. (See accompanying
115        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>)
116      </p>
117</div></td>
118</tr></table>
119<hr>
120<div class="spirit-nav">
121<a accesskey="p" href="overload2.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../insert.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="../set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
122</div>
123</body>
124</html>
125