The QHttpRequestHeader class contains request header information for HTTP. More...
#include <QHttpRequestHeader>
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Inherits: QHttpHeader.
QHttpRequestHeader () | |
QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 ) | |
QHttpRequestHeader ( const QHttpRequestHeader & header ) | |
QHttpRequestHeader ( const QString & str ) | |
QString | method () const |
QString | path () const |
void | setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 ) |
QHttpRequestHeader & | operator= ( const QHttpRequestHeader & header ) |
virtual int | majorVersion () const |
virtual int | minorVersion () const |
virtual QString | toString () const |
The QHttpRequestHeader class contains request header information for HTTP.
This class is used in the QHttp class to report the header information if the client requests something from the server.
HTTP requests have a method which describes the request's action. The most common requests are "GET" and "POST". In addition to the request method the header also includes a request-URI to specify the location for the method to use.
The method, request-URI and protocol-version can be set using a constructor or later using setRequest(). The values can be obtained using method(), path(), majorVersion() and minorVersion().
Note that the request-URI must be in the format expected by the HTTP server. That is, all reserved characters must be encoded in %HH (where HH are two hexadecimal digits). See QUrl::toPercentEncoding() for more information.
See also QHttpResponseHeader and QHttp.
Constructs an empty HTTP request header.
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. The path argument must be properly encoded for an HTTP request.
Constructs a copy of header.
Constructs a HTTP request header from the string str. The str should consist of one or more "\r\n" delimited lines; the first line should be the request-line (format: method, space, request-URI, space HTTP-version); each of the remaining lines should have the format key, colon, space, value.
Reimplemented from QHttpHeader::majorVersion().
Returns the major protocol-version of the HTTP request header.
See also minorVersion(), method(), path(), and setRequest().
Returns the method of the HTTP request header.
See also path(), majorVersion(), minorVersion(), and setRequest().
Reimplemented from QHttpHeader::minorVersion().
Returns the minor protocol-version of the HTTP request header.
See also majorVersion(), method(), path(), and setRequest().
Returns the request-URI of the HTTP request header.
See also method(), majorVersion(), minorVersion(), and setRequest().
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer. The path argument must be properly encoded for an HTTP request.
See also method(), path(), majorVersion(), and minorVersion().
Reimplemented from QHttpHeader::toString().
Copies the content of header into this QHttpRequestHeader
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.