📄 classpion_1_1_h_t_t_p_response.html
字号:
<tr> <td class="memname">void pion::HTTPResponse::writeNoCopy </td> <td>(</td> <td class="paramtype">const T & </td> <td class="paramname"> <em>data</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>write text (non-binary) response content; the data written is not copied, and therefore must persist until the response has finished sending<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>the data to append to the response content </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00077">77</a> of file <a class="el" href="_h_t_t_p_response_8hpp-source.html">HTTPResponse.hpp</a>.</div></div><p><a class="anchor" name="990278957e0b9201cbce0f2e1ea8865c"></a><!-- doxytag: member="pion::HTTPResponse::writeNoCopy" ref="990278957e0b9201cbce0f2e1ea8865c" args="(const std::string &data)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPResponse::writeNoCopy </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>data</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>write text (non-binary) response content; the data written is not copied, and therefore must persist until the response has finished sending; this specialization avoids lexical_cast for strings<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>the data to append to the response content </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00091">91</a> of file <a class="el" href="_h_t_t_p_response_8hpp-source.html">HTTPResponse.hpp</a>.</div></div><p><a class="anchor" name="f21b12e9708e6762c7b22d2ea48216d9"></a><!-- doxytag: member="pion::HTTPResponse::writeNoCopy" ref="f21b12e9708e6762c7b22d2ea48216d9" args="(void *data, size_t length)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPResponse::writeNoCopy </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>length</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>write binary response content; the data written is not copied, and therefore must persist until the response has finished sending<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>points to the binary data to append to the response content </td></tr> <tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length, in bytes, of the binary data </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00104">104</a> of file <a class="el" href="_h_t_t_p_response_8hpp-source.html">HTTPResponse.hpp</a>.</div></div><p><a class="anchor" name="01e450de281fb46e722431c5033cdffd"></a><!-- doxytag: member="pion::HTTPResponse::setCookie" ref="01e450de281fb46e722431c5033cdffd" args="(const std::string &name, const std::string &value)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPResponse::setCookie </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>the name of the cookie </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>the value of the cookie </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00122">122</a> of file <a class="el" href="_h_t_t_p_response_8hpp-source.html">HTTPResponse.hpp</a>.<p>References <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00111">addHeader()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00036">pion::HTTPTypes::HEADER_SET_COOKIE</a>, and <a class="el" href="_h_t_t_p_response_8cpp-source.html#l00095">makeSetCookieHeader()</a>.</div></div><p><a class="anchor" name="ebf871a686e33012dc9b465c110b23b8"></a><!-- doxytag: member="pion::HTTPResponse::setCookie" ref="ebf871a686e33012dc9b465c110b23b8" args="(const std::string &name, const std::string &value, const std::string &path)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPResponse::setCookie </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>value</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>path</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>the name of the cookie </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>the value of the cookie </td></tr> <tr><td valign="top"></td><td valign="top"><em>path</em> </td><td>the path of the cookie </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00135">135</a> of file <a class="el" href="_h_t_t_p_response_8hpp-source.html">HTTPResponse.hpp</a>.<p>References <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00111">addHeader()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00036">pion::HTTPTypes::HEADER_SET_COOKIE</a>, and <a class="el" href="_h_t_t_p_response_8cpp-source.html#l00095">makeSetCookieHeader()</a>.</div></div><p><a class="anchor" name="9d5d2abe9d8a07ed77671825693a446e"></a><!-- doxytag: member="pion::HTTPResponse::setCookie" ref="9d5d2abe9d8a07ed77671825693a446e" args="(const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPResponse::setCookie </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -