File: Poco.Net.HTTPMessage.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (201 lines) | stat: -rw-r--r-- 16,572 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::HTTPMessage</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class HTTPMessage</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> HTTP<br />
<b>Header:</b> Poco/Net/HTTPMessage.h</p>
<h2>Description</h2>
<div class="description">
<p>The base class for <a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a> and <a href="Poco.Net.HTTPResponse.html" title="class Poco::Net::HTTPResponse">HTTPResponse</a>. </p>
<p>Defines the common properties of all HTTP messages. These are version, content length, content type and transfer encoding. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.Net.MessageHeader.html" title="class Poco::Net::MessageHeader">MessageHeader</a></p>
<p><b>All Base Classes: </b><a href="Poco.Net.MessageHeader.html" title="class Poco::Net::MessageHeader">MessageHeader</a>, <a href="Poco.Net.NameValueCollection.html" title="class Poco::Net::NameValueCollection">NameValueCollection</a></p>
<p><b>Known Derived Classes: </b><a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>, <a href="Poco.Net.HTTPResponse.html" title="class Poco::Net::HTTPResponse">HTTPResponse</a>, <a href="Poco.Net.HTTPServerRequest.html" title="class Poco::Net::HTTPServerRequest">HTTPServerRequest</a>, <a href="Poco.Net.HTTPServerRequestImpl.html" title="class Poco::Net::HTTPServerRequestImpl">HTTPServerRequestImpl</a>, <a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a>, <a href="Poco.Net.HTTPServerResponseImpl.html" title="class Poco::Net::HTTPServerResponseImpl">HTTPServerResponseImpl</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.HTTPMessage.html#12781" title="Poco::Net::HTTPMessage::getChunkedTransferEncoding()">getChunkedTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12775" title="Poco::Net::HTTPMessage::getContentLength()">getContentLength</a>, <a href="Poco.Net.HTTPMessage.html#12786" title="Poco::Net::HTTPMessage::getContentType()">getContentType</a>, <a href="Poco.Net.HTTPMessage.html#12789" title="Poco::Net::HTTPMessage::getKeepAlive()">getKeepAlive</a>, <a href="Poco.Net.HTTPMessage.html#12778" title="Poco::Net::HTTPMessage::getTransferEncoding()">getTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12772" title="Poco::Net::HTTPMessage::getVersion()">getVersion</a>, <a href="Poco.Net.HTTPMessage.html#12779" title="Poco::Net::HTTPMessage::setChunkedTransferEncoding()">setChunkedTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12773" title="Poco::Net::HTTPMessage::setContentLength()">setContentLength</a>, <a href="Poco.Net.HTTPMessage.html#12782" title="Poco::Net::HTTPMessage::setContentType()">setContentType</a>, <a href="Poco.Net.HTTPMessage.html#12787" title="Poco::Net::HTTPMessage::setKeepAlive()">setKeepAlive</a>, <a href="Poco.Net.HTTPMessage.html#12776" title="Poco::Net::HTTPMessage::setTransferEncoding()">setTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12770" title="Poco::Net::HTTPMessage::setVersion()">setVersion</a></p>
<p><b>Inherited Functions: </b><a href="Poco.Net.NameValueCollection.html#14067" title="Poco::Net::NameValueCollection::add()">add</a>, <a href="Poco.Net.NameValueCollection.html#14079" title="Poco::Net::NameValueCollection::begin()">begin</a>, <a href="Poco.Net.NameValueCollection.html#14085" title="Poco::Net::NameValueCollection::clear()">clear</a>, <a href="Poco.Net.NameValueCollection.html#14081" title="Poco::Net::NameValueCollection::empty()">empty</a>, <a href="Poco.Net.NameValueCollection.html#14080" title="Poco::Net::NameValueCollection::end()">end</a>, <a href="Poco.Net.NameValueCollection.html#14083" title="Poco::Net::NameValueCollection::erase()">erase</a>, <a href="Poco.Net.NameValueCollection.html#14077" title="Poco::Net::NameValueCollection::find()">find</a>, <a href="Poco.Net.NameValueCollection.html#14070" title="Poco::Net::NameValueCollection::get()">get</a>, <a href="Poco.Net.NameValueCollection.html#14075" title="Poco::Net::NameValueCollection::has()">has</a>, <a href="Poco.Net.NameValueCollection.html#14062" title="Poco::Net::NameValueCollection::operator()">operator</a>, <a href="Poco.Net.MessageHeader.html#13915" title="Poco::Net::MessageHeader::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.MessageHeader.html#13933" title="Poco::Net::MessageHeader::quote()">quote</a>, <a href="Poco.Net.MessageHeader.html#13919" title="Poco::Net::MessageHeader::read()">read</a>, <a href="Poco.Net.NameValueCollection.html#14064" title="Poco::Net::NameValueCollection::set()">set</a>, <a href="Poco.Net.NameValueCollection.html#14082" title="Poco::Net::NameValueCollection::size()">size</a>, <a href="Poco.Net.MessageHeader.html#13921" title="Poco::Net::MessageHeader::splitElements()">splitElements</a>, <a href="Poco.Net.MessageHeader.html#13925" title="Poco::Net::MessageHeader::splitParameters()">splitParameters</a>, <a href="Poco.Net.NameValueCollection.html#14060" title="Poco::Net::NameValueCollection::swap()">swap</a>, <a href="Poco.Net.MessageHeader.html#13917" title="Poco::Net::MessageHeader::write()">write</a></p>
<h2>Constructors</h2>
<h3><a name="12803">HTTPMessage</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a> with version HTTP/1.0. </p>
</div>
<h3><a name="12804">HTTPMessage</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; version<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a> and sets the version. </p>
</div>
<h2>Destructor</h2>
<h3><a name="12806">~HTTPMessage</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="12781">getChunkedTransferEncoding</a></h3>
<p class="decl">bool getChunkedTransferEncoding() const;</p>
<div class="description">
<p>Returns true if the Transfer-Encoding header is set and its value is chunked. </p>
</div>
<h3><a name="12775">getContentLength</a></h3>
<p class="decl">int getContentLength() const;</p>
<div class="description">
<p>Returns the content length for this message, which may be <a href="Poco.Net.HTTPMessage.html#12794" title="Poco::Net::HTTPMessage::UNKNOWN_CONTENT_LENGTH">UNKNOWN_CONTENT_LENGTH</a> if no Content-Length header is present. </p>
</div>
<h3><a name="12786">getContentType</a></h3>
<p class="decl">const std::string &amp; getContentType() const;</p>
<div class="description">
<p>Returns the content type for this message. </p>
<p>If no Content-Type header is present,  returns <a href="Poco.Net.HTTPMessage.html#12795" title="Poco::Net::HTTPMessage::UNKNOWN_CONTENT_TYPE">UNKNOWN_CONTENT_TYPE</a>.	 </p>
</div>
<h3><a name="12789">getKeepAlive</a></h3>
<p class="decl">bool getKeepAlive() const;</p>
<div class="description">
<p>Returns true if </p>
<ul>
<li>the message has a Connection header field and its value is &quot;Keep-Alive&quot; </li>
<li>the message is a HTTP/1.1 message and not Connection header is set </li>
</ul>
<p>Returns false otherwise. </p>
</div>
<h3><a name="12778">getTransferEncoding</a></h3>
<p class="decl">const std::string &amp; getTransferEncoding() const;</p>
<div class="description">
<p>Returns the transfer encoding used for this message. </p>
<p>Normally, this is the value of the Transfer-Encoding header field. If no such field is present, returns IDENTITY_TRANSFER_CODING. </p>
</div>
<h3><a name="12772">getVersion</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getVersion() const;</p>
<div class="description">
<p>Returns the HTTP version for this message. </p>
</div>
<h3><a name="12779">setChunkedTransferEncoding</a></h3>
<p class="decl">void setChunkedTransferEncoding(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>If flag is true, sets the Transfer-Encoding header to chunked. Otherwise, removes the Transfer-Encoding header. </p>
</div>
<h3><a name="12773">setContentLength</a></h3>
<p class="decl">void setContentLength(<br />&nbsp;&nbsp;&nbsp;&nbsp;int length<br />);</p>
<div class="description">
<p>Sets the Content-Length header. </p>
<p>If length is <a href="Poco.Net.HTTPMessage.html#12794" title="Poco::Net::HTTPMessage::UNKNOWN_CONTENT_LENGTH">UNKNOWN_CONTENT_LENGTH</a>, removes the Content-Length header. </p>
</div>
<h3><a name="12782">setContentType</a></h3>
<p class="decl">void setContentType(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; mediaType<br />);</p>
<div class="description">
<p>Sets the content type for this message. </p>
<p>Specify NO_CONTENT_TYPE to remove the Content-Type header. </p>
</div>
<h3><a name="12784">setContentType</a></h3>
<p class="decl">void setContentType(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.MediaType.html" title="class Poco::Net::MediaType">MediaType</a> &amp; mediaType<br />);</p>
<div class="description">
<p>Sets the content type for this message. </p>
</div>
<h3><a name="12787">setKeepAlive</a></h3>
<p class="decl">void setKeepAlive(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool keepAlive<br />);</p>
<div class="description">
<p>Sets the value of the Connection header field. </p>
<p>The value is set to &quot;Keep-Alive&quot; if keepAlive is true, or to &quot;Close&quot; otherwise. </p>
</div>
<h3><a name="12776">setTransferEncoding</a></h3>
<p class="decl">void setTransferEncoding(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; transferEncoding<br />);</p>
<div class="description">
<p>Sets the transfer encoding for this message. </p>
<p>The value should be either IDENTITY_TRANSFER_CODING or CHUNKED_TRANSFER_CODING. </p>
</div>
<h3><a name="12770">setVersion</a></h3>
<p class="decl">void setVersion(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; version<br />);</p>
<div class="description">
<p>Sets the HTTP version for this message. </p>
</div>
<h2>Variables</h2>
<h3><a name="12793">CHUNKED_TRANSFER_ENCODING</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12793" title="Poco::Net::HTTPMessage::CHUNKED_TRANSFER_ENCODING">CHUNKED_TRANSFER_ENCODING</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12799">CONNECTION</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12799" title="Poco::Net::HTTPMessage::CONNECTION">CONNECTION</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12801">CONNECTION_CLOSE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12801" title="Poco::Net::HTTPMessage::CONNECTION_CLOSE">CONNECTION_CLOSE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12800">CONNECTION_KEEP_ALIVE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12800" title="Poco::Net::HTTPMessage::CONNECTION_KEEP_ALIVE">CONNECTION_KEEP_ALIVE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12796">CONTENT_LENGTH</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12796" title="Poco::Net::HTTPMessage::CONTENT_LENGTH">CONTENT_LENGTH</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12797">CONTENT_TYPE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12797" title="Poco::Net::HTTPMessage::CONTENT_TYPE">CONTENT_TYPE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12802">EMPTY</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12802" title="Poco::Net::HTTPMessage::EMPTY">EMPTY</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12790">HTTP_1_0</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12790" title="Poco::Net::HTTPMessage::HTTP_1_0">HTTP_1_0</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12791">HTTP_1_1</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12791" title="Poco::Net::HTTPMessage::HTTP_1_1">HTTP_1_1</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12792">IDENTITY_TRANSFER_ENCODING</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12792" title="Poco::Net::HTTPMessage::IDENTITY_TRANSFER_ENCODING">IDENTITY_TRANSFER_ENCODING</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12798">TRANSFER_ENCODING</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12798" title="Poco::Net::HTTPMessage::TRANSFER_ENCODING">TRANSFER_ENCODING</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12794">UNKNOWN_CONTENT_LENGTH</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const int <a href="Poco.Net.HTTPMessage.html#12794" title="Poco::Net::HTTPMessage::UNKNOWN_CONTENT_LENGTH">UNKNOWN_CONTENT_LENGTH</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12795">UNKNOWN_CONTENT_TYPE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const std::string <a href="Poco.Net.HTTPMessage.html#12795" title="Poco::Net::HTTPMessage::UNKNOWN_CONTENT_TYPE">UNKNOWN_CONTENT_TYPE</a>;</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>