1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
3
<html><head><title>QHttpRequestHeader Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
4
a:link { color: #004faf; text-decoration: none }
5
a:visited { color: #672967; text-decoration: none }
6
td.postheader { font-family: sans-serif }
7
tr.address { font-family: sans-serif }
8
body { background: #ffffff; color: black; }
9
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QHttpRequestHeader Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QHttpRequestHeader class contains request header information
10
for HTTP. <a href="#details">More...</a></p>
12
<p>Inherits <a href="qhttpheader.html">QHttpHeader</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qhttprequestheader.html#QHttpRequestHeader">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qhttprequestheader.html#QHttpRequestHeader-2">__init__</a></b> (<i>self</i>, QString <i>method</i>, QString <i>path</i>, int <i>major</i> = 1, int <i>minor</i> = 1)</li><li><div class="fn" /><b><a href="qhttprequestheader.html#QHttpRequestHeader-3">__init__</a></b> (<i>self</i>, QHttpRequestHeader <i>header</i>)</li><li><div class="fn" /><b><a href="qhttprequestheader.html#QHttpRequestHeader-4">__init__</a></b> (<i>self</i>, QString <i>str</i>)</li><li><div class="fn" />int <b><a href="qhttprequestheader.html#majorVersion">majorVersion</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qhttprequestheader.html#method">method</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qhttprequestheader.html#minorVersion">minorVersion</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qhttprequestheader.html#parseLine">parseLine</a></b> (<i>self</i>, QString <i>line</i>, int <i>number</i>)</li><li><div class="fn" />QString <b><a href="qhttprequestheader.html#path">path</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qhttprequestheader.html#setRequest">setRequest</a></b> (<i>self</i>, QString <i>method</i>, QString <i>path</i>, int <i>major</i> = 1, int <i>minor</i> = 1)</li><li><div class="fn" />QString <b><a href="qhttprequestheader.html#toString">toString</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QHttpRequestHeader class contains request header information
14
<p>This class is used in the <a href="qhttp.html">QHttp</a> class
15
to report the header information if the client requests something
17
<p>HTTP requests have a method which describes the request's
18
action. The most common requests are "GET" and "POST". In addition
19
to the request method the header also includes a request-URI to
20
specify the location for the method to use.</p>
21
<p>The method, request-URI and protocol-version can be set using a
22
constructor or later using <a href="qhttprequestheader.html#setRequest">setRequest</a>(). The values
23
can be obtained using <a href="qhttprequestheader.html#method">method</a>(), <a href="qhttprequestheader.html#pathx">path</a>(), <a href="qhttprequestheader.html#majorVersion">majorVersion</a>() and
24
<a href="qhttprequestheader.html#minorVersion">minorVersion</a>().</p>
25
<p>Note that the request-URI must be in the format expected by the
26
HTTP server. That is, all reserved characters must be encoded in
27
%HH (where HH are two hexadecimal digits). See <a href="qurl.html#toPercentEncoding">QUrl.toPercentEncoding</a>() for
29
<p>Important inherited functions: <a href="qhttpheader.html#setValue">setValue</a>() and <a href="qhttpheader.html#value">value</a>().</p>
30
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QHttpRequestHeader" />QHttpRequestHeader.__init__ (<i>self</i>)</h3><p>Constructs an empty HTTP request header.</p>
33
<h3 class="fn"><a name="QHttpRequestHeader-2" />QHttpRequestHeader.__init__ (<i>self</i>, QString <i>method</i>, QString <i>path</i>, int <i>major</i> = 1, int <i>minor</i> = 1)</h3><p>Constructs a HTTP request header for the method <i>method</i>,
34
the request-URI <i>path</i> and the protocol-version
35
<i>majorVer</i> and <i>minorVer</i>. The <i>path</i> argument must
36
be properly encoded for an HTTP request.</p>
39
<h3 class="fn"><a name="QHttpRequestHeader-3" />QHttpRequestHeader.__init__ (<i>self</i>, <a href="qhttprequestheader.html">QHttpRequestHeader</a> <i>header</i>)</h3><p>Constructs a copy of <i>header</i>.</p>
42
<h3 class="fn"><a name="QHttpRequestHeader-4" />QHttpRequestHeader.__init__ (<i>self</i>, QString <i>str</i>)</h3><p>Constructs a HTTP request header from the string <i>str</i>. The
43
<i>str</i> should consist of one or more "\r\n" delimited lines;
44
the first line should be the request-line (format: method, space,
45
request-URI, space HTTP-version); each of the remaining lines
46
should have the format key, colon, space, value.</p>
49
<h3 class="fn"><a name="majorVersion" />int QHttpRequestHeader.majorVersion (<i>self</i>)</h3><p>Reimplemented from <a href="qhttpheader.html#majorVersion">QHttpHeader.majorVersion</a>().</p>
50
<p>Returns the major protocol-version of the HTTP request
52
<p><b>See also</b> <a href="qhttprequestheader.html#minorVersion">minorVersion</a>(), <a href="qhttprequestheader.html#method">method</a>(), <a href="qhttprequestheader.html#pathx">path</a>(), and <a href="qhttprequestheader.html#setRequest">setRequest</a>().</p>
55
<h3 class="fn"><a name="method" />QString QHttpRequestHeader.method (<i>self</i>)</h3><p>Returns the method of the HTTP request header.</p>
56
<p><b>See also</b> <a href="qhttprequestheader.html#pathx">path</a>(), <a href="qhttprequestheader.html#majorVersion">majorVersion</a>(), <a href="qhttprequestheader.html#minorVersion">minorVersion</a>(), and
57
<a href="qhttprequestheader.html#setRequest">setRequest</a>().</p>
60
<h3 class="fn"><a name="minorVersion" />int QHttpRequestHeader.minorVersion (<i>self</i>)</h3><p>Reimplemented from <a href="qhttpheader.html#minorVersion">QHttpHeader.minorVersion</a>().</p>
61
<p>Returns the minor protocol-version of the HTTP request
63
<p><b>See also</b> <a href="qhttprequestheader.html#majorVersion">majorVersion</a>(), <a href="qhttprequestheader.html#method">method</a>(), <a href="qhttprequestheader.html#pathx">path</a>(), and <a href="qhttprequestheader.html#setRequest">setRequest</a>().</p>
66
<h3 class="fn"><a name="parseLine" />bool QHttpRequestHeader.parseLine (<i>self</i>, QString <i>line</i>, int <i>number</i>)</h3><h3 class="fn"><a name="path" />QString QHttpRequestHeader.path (<i>self</i>)</h3><h3 class="fn"><a name="setRequest" />QHttpRequestHeader.setRequest (<i>self</i>, QString <i>method</i>, QString <i>path</i>, int <i>major</i> = 1, int <i>minor</i> = 1)</h3><p>This function sets the request method to <i>method</i>, the
67
request-URI to <i>path</i> and the protocol-version to
68
<i>majorVer</i> and <i>minorVer</i>. The <i>path</i> argument must
69
be properly encoded for an HTTP request.</p>
70
<p><b>See also</b> <a href="qhttprequestheader.html#method">method</a>(), <a href="qhttprequestheader.html#pathx">path</a>(), <a href="qhttprequestheader.html#majorVersion">majorVersion</a>(), and
71
<a href="qhttprequestheader.html#minorVersion">minorVersion</a>().</p>
74
<h3 class="fn"><a name="toString" />QString QHttpRequestHeader.toString (<i>self</i>)</h3><p>Reimplemented from <a href="qhttpheader.html#toString">QHttpHeader.toString</a>().</p>
77
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'