[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/network/qhttp.cpp:836 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QHttpRequestHeader Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QHttpRequestHeader Class Reference<br><small>[<a href="network.html">network module</a>]</small></h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QHttpRequestHeader class contains request header information for
|
---|
| 35 |
|
---|
| 36 | HTTP.
|
---|
| 37 | <a href="#details">More...</a>
|
---|
| 38 | <p><tt>#include <<a href="qhttp-h.html">qhttp.h</a>></tt>
|
---|
| 39 | <p>Inherits <a href="qhttpheader.html">QHttpHeader</a>.
|
---|
| 40 | <p><a href="qhttprequestheader-members.html">List of all member functions.</a>
|
---|
| 41 | <h2>Public Members</h2>
|
---|
| 42 | <ul>
|
---|
| 43 | <li class=fn><a href="#QHttpRequestHeader"><b>QHttpRequestHeader</b></a> ()</li>
|
---|
| 44 | <li class=fn><a href="#QHttpRequestHeader-2"><b>QHttpRequestHeader</b></a> ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )</li>
|
---|
| 45 | <li class=fn><a href="#QHttpRequestHeader-3"><b>QHttpRequestHeader</b></a> ( const QHttpRequestHeader & header )</li>
|
---|
| 46 | <li class=fn><a href="#QHttpRequestHeader-4"><b>QHttpRequestHeader</b></a> ( const QString & str )</li>
|
---|
| 47 | <li class=fn>void <a href="#setRequest"><b>setRequest</b></a> ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )</li>
|
---|
| 48 | <li class=fn>QString <a href="#method"><b>method</b></a> () const</li>
|
---|
| 49 | <li class=fn>QString <a href="#path"><b>path</b></a> () const</li>
|
---|
| 50 | <li class=fn>virtual int <a href="#majorVersion"><b>majorVersion</b></a> () const</li>
|
---|
| 51 | <li class=fn>virtual int <a href="#minorVersion"><b>minorVersion</b></a> () const</li>
|
---|
| 52 | </ul>
|
---|
| 53 | <h2>Important Inherited Members</h2>
|
---|
| 54 | <ul>
|
---|
| 55 | <li class=fn>QString <a href="#value"><b>value</b></a> ( const QString & key ) const</li>
|
---|
| 56 | <li class=fn>void <a href="#setValue"><b>setValue</b></a> ( const QString & key, const QString & value )</li>
|
---|
| 57 | </ul>
|
---|
| 58 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | The QHttpRequestHeader class contains request header information for
|
---|
| 62 |
|
---|
| 63 | HTTP.
|
---|
| 64 |
|
---|
| 65 | <p>
|
---|
| 66 |
|
---|
| 67 | <p> This class is used in the <a href="qhttp.html">QHttp</a> class to report the header
|
---|
| 68 | information if the client requests something from the server.
|
---|
| 69 | <p> HTTP requests have a method which describes the request's action.
|
---|
| 70 | The most common requests are "GET" and "POST". In addition to the
|
---|
| 71 | request method the header also includes a request-URI to specify
|
---|
| 72 | the location for the method to use.
|
---|
| 73 | <p> The method, request-URI and protocol-version can be set using a
|
---|
| 74 | constructor or later using <a href="#setRequest">setRequest</a>(). The values can be
|
---|
| 75 | obtained using <a href="#method">method</a>(), <a href="#path">path</a>(), <a href="#majorVersion">majorVersion</a>() and
|
---|
| 76 | <a href="#minorVersion">minorVersion</a>().
|
---|
| 77 | <p> This class is a <a href="qhttpheader.html">QHttpHeader</a> subclass so that class's functions,
|
---|
| 78 | e.g. <a href="qhttpheader.html#setValue">setValue()</a>, <a href="qhttpheader.html#value">value()</a>, etc. are also available.
|
---|
| 79 | <p> <p>See also <a href="qhttpresponseheader.html">QHttpResponseHeader</a>, <a href="qhttp.html">QHttp</a>, and <a href="io.html">Input/Output and Networking</a>.
|
---|
| 80 |
|
---|
| 81 | <p>
|
---|
| 82 | <hr><h2>Member Function Documentation</h2>
|
---|
| 83 | <h3 class=fn><a name="QHttpRequestHeader"></a>QHttpRequestHeader::QHttpRequestHeader ()
|
---|
| 84 | </h3>
|
---|
| 85 | Constructs an empty HTTP request header.
|
---|
| 86 |
|
---|
| 87 | <h3 class=fn><a name="QHttpRequestHeader-2"></a>QHttpRequestHeader::QHttpRequestHeader ( const <a href="qstring.html">QString</a> & method, const <a href="qstring.html">QString</a> & path, int majorVer = 1, int minorVer = 1 )
|
---|
| 88 | </h3>
|
---|
| 89 | Constructs a HTTP request header for the method <em>method</em>, the
|
---|
| 90 | request-URI <em>path</em> and the protocol-version <em>majorVer</em> and <em>minorVer</em>.
|
---|
| 91 |
|
---|
| 92 | <h3 class=fn><a name="QHttpRequestHeader-3"></a>QHttpRequestHeader::QHttpRequestHeader ( const <a href="qhttprequestheader.html">QHttpRequestHeader</a> & header )
|
---|
| 93 | </h3>
|
---|
| 94 | Constructs a copy of <em>header</em>.
|
---|
| 95 |
|
---|
| 96 | <h3 class=fn><a name="QHttpRequestHeader-4"></a>QHttpRequestHeader::QHttpRequestHeader ( const <a href="qstring.html">QString</a> & str )
|
---|
| 97 | </h3>
|
---|
| 98 | Constructs a HTTP request header from the string <em>str</em>. The <em>str</em> should consist of one or more "\r\n" delimited lines; the first line
|
---|
| 99 | should be the request-line (format: method, space, request-URI, space
|
---|
| 100 | HTTP-version); each of the remaining lines should have the format key,
|
---|
| 101 | colon, space, value.
|
---|
| 102 |
|
---|
| 103 | <h3 class=fn>int <a name="majorVersion"></a>QHttpRequestHeader::majorVersion () const<tt> [virtual]</tt>
|
---|
| 104 | </h3>
|
---|
| 105 | Returns the major protocol-version of the HTTP request header.
|
---|
| 106 | <p> <p>See also <a href="#minorVersion">minorVersion</a>(), <a href="#method">method</a>(), <a href="#path">path</a>(), and <a href="#setRequest">setRequest</a>().
|
---|
| 107 |
|
---|
| 108 | <p>Reimplemented from <a href="qhttpheader.html#majorVersion">QHttpHeader</a>.
|
---|
| 109 | <h3 class=fn><a href="qstring.html">QString</a> <a name="method"></a>QHttpRequestHeader::method () const
|
---|
| 110 | </h3>
|
---|
| 111 | Returns the method of the HTTP request header.
|
---|
| 112 | <p> <p>See also <a href="#path">path</a>(), <a href="#majorVersion">majorVersion</a>(), <a href="#minorVersion">minorVersion</a>(), and <a href="#setRequest">setRequest</a>().
|
---|
| 113 |
|
---|
| 114 | <h3 class=fn>int <a name="minorVersion"></a>QHttpRequestHeader::minorVersion () const<tt> [virtual]</tt>
|
---|
| 115 | </h3>
|
---|
| 116 | Returns the minor protocol-version of the HTTP request header.
|
---|
| 117 | <p> <p>See also <a href="#majorVersion">majorVersion</a>(), <a href="#method">method</a>(), <a href="#path">path</a>(), and <a href="#setRequest">setRequest</a>().
|
---|
| 118 |
|
---|
| 119 | <p>Reimplemented from <a href="qhttpheader.html#minorVersion">QHttpHeader</a>.
|
---|
| 120 | <h3 class=fn><a href="qstring.html">QString</a> <a name="path"></a>QHttpRequestHeader::path () const
|
---|
| 121 | </h3>
|
---|
| 122 | Returns the request-URI of the HTTP request header.
|
---|
| 123 | <p> <p>See also <a href="#method">method</a>(), <a href="#majorVersion">majorVersion</a>(), <a href="#minorVersion">minorVersion</a>(), and <a href="#setRequest">setRequest</a>().
|
---|
| 124 |
|
---|
| 125 | <h3 class=fn>void <a name="setRequest"></a>QHttpRequestHeader::setRequest ( const <a href="qstring.html">QString</a> & method, const <a href="qstring.html">QString</a> & path, int majorVer = 1, int minorVer = 1 )
|
---|
| 126 | </h3>
|
---|
| 127 | This function sets the request method to <em>method</em>, the
|
---|
| 128 | request-URI to <em>path</em> and the protocol-version to <em>majorVer</em> and
|
---|
| 129 | <em>minorVer</em>.
|
---|
| 130 | <p> <p>See also <a href="#method">method</a>(), <a href="#path">path</a>(), <a href="#majorVersion">majorVersion</a>(), and <a href="#minorVersion">minorVersion</a>().
|
---|
| 131 |
|
---|
| 132 | <h3 class=fn>void <a name="setValue"></a>QHttpHeader::setValue ( const <a href="qstring.html">QString</a> & key, const <a href="qstring.html">QString</a> & value )
|
---|
| 133 | </h3>
|
---|
| 134 | Sets the value of the entry with the <em>key</em> to <em>value</em>.
|
---|
| 135 | <p> If no entry with <em>key</em> exists, a new entry with the given <em>key</em>
|
---|
| 136 | and <em>value</em> is created. If an entry with the <em>key</em> already
|
---|
| 137 | exists, its value is discarded and replaced with the given <em>value</em>.
|
---|
| 138 | <p> <p>See also <a href="qhttpheader.html#value">value</a>(), <a href="qhttpheader.html#hasKey">hasKey</a>(), and <a href="qhttpheader.html#removeValue">removeValue</a>().
|
---|
| 139 |
|
---|
| 140 | <p>Example: <a href="archivesearch-example.html#x476">network/archivesearch/archivedialog.ui.h</a>.
|
---|
| 141 | <h3 class=fn><a href="qstring.html">QString</a> <a name="value"></a>QHttpHeader::value ( const <a href="qstring.html">QString</a> & key ) const
|
---|
| 142 | </h3>
|
---|
| 143 | Returns the value for the entry with the given <em>key</em>. If no entry
|
---|
| 144 | has this <em>key</em>, an empty string is returned.
|
---|
| 145 | <p> <p>See also <a href="qhttpheader.html#setValue">setValue</a>(), <a href="qhttpheader.html#removeValue">removeValue</a>(), <a href="qhttpheader.html#hasKey">hasKey</a>(), and <a href="qhttpheader.html#keys">keys</a>().
|
---|
| 146 |
|
---|
| 147 | <!-- eof -->
|
---|
| 148 | <hr><p>
|
---|
| 149 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 150 | Copyright © 1995-2007
|
---|
| 151 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 152 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 153 | <td>Copyright © 2007
|
---|
| 154 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 155 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 156 | </table></div></address></body>
|
---|
| 157 | </html>
|
---|