File: Poco.Net.HTTPRequest.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 (199 lines) | stat: -rw-r--r-- 17,612 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
<!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::HTTPRequest</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 HTTPRequest</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> HTTP<br />
<b>Header:</b> Poco/Net/HTTPRequest.h</p>
<h2>Description</h2>
<div class="description">
<p>This class encapsulates an HTTP request message. </p>
<p>In addition to the properties common to all HTTP messages, a HTTP request has a method (e.g. GET, HEAD, POST, etc.) and a request <a href="Poco.URI.html" title="class Poco::URI">URI</a>. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a></p>
<p><b>All Base Classes: </b><a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>, <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.HTTPServerRequest.html" title="class Poco::Net::HTTPServerRequest">HTTPServerRequest</a>, <a href="Poco.Net.HTTPServerRequestImpl.html" title="class Poco::Net::HTTPServerRequestImpl">HTTPServerRequestImpl</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.HTTPRequest.html#12838" title="Poco::Net::HTTPRequest::getCookies()">getCookies</a>, <a href="Poco.Net.HTTPRequest.html#12841" title="Poco::Net::HTTPRequest::getCredentials()">getCredentials</a>, <a href="Poco.Net.HTTPRequest.html#12835" title="Poco::Net::HTTPRequest::getHost()">getHost</a>, <a href="Poco.Net.HTTPRequest.html#12826" title="Poco::Net::HTTPRequest::getMethod()">getMethod</a>, <a href="Poco.Net.HTTPRequest.html#12829" title="Poco::Net::HTTPRequest::getURI()">getURI</a>, <a href="Poco.Net.HTTPRequest.html#12840" title="Poco::Net::HTTPRequest::hasCredentials()">hasCredentials</a>, <a href="Poco.Net.HTTPRequest.html#12849" title="Poco::Net::HTTPRequest::read()">read</a>, <a href="Poco.Net.HTTPRequest.html#12836" title="Poco::Net::HTTPRequest::setCookies()">setCookies</a>, <a href="Poco.Net.HTTPRequest.html#12844" title="Poco::Net::HTTPRequest::setCredentials()">setCredentials</a>, <a href="Poco.Net.HTTPRequest.html#12830" title="Poco::Net::HTTPRequest::setHost()">setHost</a>, <a href="Poco.Net.HTTPRequest.html#12824" title="Poco::Net::HTTPRequest::setMethod()">setMethod</a>, <a href="Poco.Net.HTTPRequest.html#12827" title="Poco::Net::HTTPRequest::setURI()">setURI</a>, <a href="Poco.Net.HTTPRequest.html#12847" title="Poco::Net::HTTPRequest::write()">write</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.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.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.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#12784" 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>, <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="12813">HTTPRequest</a></h3>
<p class="decl"><a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>();</p>
<div class="description">
<p>Creates a GET / HTTP/1.0 HTTP request. </p>
</div>
<h3><a name="12814">HTTPRequest</a></h3>
<p class="decl"><a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; version<br />);</p>
<div class="description">
<p>Creates a GET / HTTP/1.x request with the given version (HTTP/1.0 or HTTP/1.1). </p>
</div>
<h3><a name="12816">HTTPRequest</a></h3>
<p class="decl"><a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; method,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; uri<br />);</p>
<div class="description">
<p>Creates a HTTP/1.0 request with the given method and <a href="Poco.URI.html" title="class Poco::URI">URI</a>. </p>
</div>
<h3><a name="12819">HTTPRequest</a></h3>
<p class="decl"><a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; method,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; uri,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; version<br />);</p>
<div class="description">
<p>Creates a HTTP request with the given method, <a href="Poco.URI.html" title="class Poco::URI">URI</a> and version. </p>
</div>
<h2>Destructor</h2>
<h3><a name="12823">~HTTPRequest</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.HTTPRequest.html" title="class Poco::Net::HTTPRequest">HTTPRequest</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="12838">getCookies</a></h3>
<p class="decl">void getCookies(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.NameValueCollection.html" title="class Poco::Net::NameValueCollection">NameValueCollection</a> &amp; cookies<br />) const;</p>
<div class="description">
<p>Fills cookies with the cookies extracted from the Cookie headers in the request. </p>
</div>
<h3><a name="12841">getCredentials</a></h3>
<p class="decl">void getCredentials(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; scheme,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; authInfo<br />) const;</p>
<div class="description">
<p>Returns the authentication scheme and additional authentication information contained in this request. </p>
<p>Throws a <a href="Poco.Net.NotAuthenticatedException.html" title="class Poco::Net::NotAuthenticatedException">NotAuthenticatedException</a> if no authentication information is contained in the request. </p>
</div>
<h3><a name="12835">getHost</a></h3>
<p class="decl">const std::string &amp; getHost() const;</p>
<div class="description">
<p>Returns the value of the Host header field. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the request does not have a Host header field. </p>
</div>
<h3><a name="12826">getMethod</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getMethod() const;</p>
<div class="description">
<p>Returns the method. </p>
</div>
<h3><a name="12829">getURI</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getURI() const;</p>
<div class="description">
<p>Returns the request <a href="Poco.URI.html" title="class Poco::URI">URI</a>. </p>
</div>
<h3><a name="12840">hasCredentials</a></h3>
<p class="decl">bool hasCredentials() const;</p>
<div class="description">
<p>Returns true if and only if the request contains authentication information in the form of an Authorization header. </p>
</div>
<h3><a name="12849">read</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void read(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::istream &amp; istr<br />);</p>
<div class="description">
<p>Reads the HTTP request from the given input stream. </p>
</div>
<div class="description"><p><b>See also:</b> <a href="Poco.Net.MessageHeader.html#13919" title="Poco::Net::MessageHeader::read()">Poco::Net::MessageHeader::read()</a></p></div>
<h3><a name="12836">setCookies</a></h3>
<p class="decl">void setCookies(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.NameValueCollection.html" title="class Poco::Net::NameValueCollection">NameValueCollection</a> &amp; cookies<br />);</p>
<div class="description">
<p>Adds a Cookie header with the names and values from cookies. </p>
</div>
<h3><a name="12844">setCredentials</a></h3>
<p class="decl">void setCredentials(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; scheme,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; authInfo<br />);</p>
<div class="description">
<p>Sets the authentication scheme and information for this request. </p>
</div>
<h3><a name="12830">setHost</a></h3>
<p class="decl">void setHost(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; host<br />);</p>
<div class="description">
<p>Sets the value of the Host header field. </p>
</div>
<h3><a name="12832">setHost</a></h3>
<p class="decl">void setHost(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; host,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> port<br />);</p>
<div class="description">
<p>Sets the value of the Host header field. </p>
</div>
<h3><a name="12824">setMethod</a></h3>
<p class="decl">void setMethod(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; method<br />);</p>
<div class="description">
<p>Sets the method. </p>
</div>
<h3><a name="12827">setURI</a></h3>
<p class="decl">void setURI(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; uri<br />);</p>
<div class="description">
<p>Sets the request <a href="Poco.URI.html" title="class Poco::URI">URI</a>. </p>
</div>
<h3><a name="12847">write</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void write(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr<br />) const;</p>
<div class="description">
<p>Writes the HTTP request to the given output stream. </p>
</div>
<div class="description"><p><b>See also:</b> <a href="Poco.Net.MessageHeader.html#13917" title="Poco::Net::MessageHeader::write()">Poco::Net::MessageHeader::write()</a></p></div>
<h2>Variables</h2>
<h3><a name="12861">AUTHORIZATION</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.HTTPRequest.html#12861" title="Poco::Net::HTTPRequest::AUTHORIZATION">AUTHORIZATION</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12860">COOKIE</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.HTTPRequest.html#12860" title="Poco::Net::HTTPRequest::COOKIE">COOKIE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12859">HOST</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.HTTPRequest.html#12859" title="Poco::Net::HTTPRequest::HOST">HOST</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12858">HTTP_CONNECT</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.HTTPRequest.html#12858" title="Poco::Net::HTTPRequest::HTTP_CONNECT">HTTP_CONNECT</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12856">HTTP_DELETE</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.HTTPRequest.html#12856" title="Poco::Net::HTTPRequest::HTTP_DELETE">HTTP_DELETE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12851">HTTP_GET</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.HTTPRequest.html#12851" title="Poco::Net::HTTPRequest::HTTP_GET">HTTP_GET</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12852">HTTP_HEAD</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.HTTPRequest.html#12852" title="Poco::Net::HTTPRequest::HTTP_HEAD">HTTP_HEAD</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12855">HTTP_OPTIONS</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.HTTPRequest.html#12855" title="Poco::Net::HTTPRequest::HTTP_OPTIONS">HTTP_OPTIONS</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12854">HTTP_POST</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.HTTPRequest.html#12854" title="Poco::Net::HTTPRequest::HTTP_POST">HTTP_POST</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12853">HTTP_PUT</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.HTTPRequest.html#12853" title="Poco::Net::HTTPRequest::HTTP_PUT">HTTP_PUT</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="12857">HTTP_TRACE</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.HTTPRequest.html#12857" title="Poco::Net::HTTPRequest::HTTP_TRACE">HTTP_TRACE</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>