QHttpRequestHeader(3qt)

NAME
QHttpRequestHeader - Request header information for HTTP

SYNOPSIS
#include <qhttp.h>

Inherits QHttpHeader.

  Public Members
<li class=fn>QHttpRequestHeader () <li class=fn>QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 ) <li class=fn>QHttpRequestHeader ( const QHttpRequestHeader & header ) <li class=fn>QHttpRequestHeader ( const QString & str ) <li class=fn>void setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 ) <li class=fn>QString method () const <li class=fn>QString path () const <li class=fn>virtual int majorVersion () const <li class=fn>virtual int minorVersion () const

  Important Inherited Members
<li class=fn>QString value ( const QString & key ) const <li class=fn>void setValue ( const QString & key, const QString & value )

DESCRIPTION
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().

This class is a QHttpHeader subclass so that class's functions, e.g. setValue(), value(), etc. are also available.

See also QHttpResponseHeader, QHttp, and Input/Output and Networking.

MEMBER FUNCTION DOCUMENTATION

QHttpRequestHeader::QHttpRequestHeader ()
Constructs an empty HTTP request header.

QHttpRequestHeader::QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer.

QHttpRequestHeader::QHttpRequestHeader ( const QHttpRequestHeader & header )
Constructs a copy of header.

QHttpRequestHeader::QHttpRequestHeader ( const QString & str )
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.

int QHttpRequestHeader::majorVersion () const [virtual]
Returns the major protocol-version of the HTTP request header.

See also minorVersion(), method(), path(), and setRequest().

Reimplemented from QHttpHeader.

QString QHttpRequestHeader::method () const
Returns the method of the HTTP request header.

See also path(), majorVersion(), minorVersion(), and setRequest().

int QHttpRequestHeader::minorVersion () const [virtual]
Returns the minor protocol-version of the HTTP request header.

See also majorVersion(), method(), path(), and setRequest().

Reimplemented from QHttpHeader.

QString QHttpRequestHeader::path () const
Returns the request-URI of the HTTP request header.

See also method(), majorVersion(), minorVersion(), and setRequest().

void QHttpRequestHeader::setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.

See also method(), path(), majorVersion(), and minorVersion().

void QHttpHeader::setValue ( const QString & key, const QString & value )
Sets the value of the entry with the key to value.

If no entry with key exists, a new entry with the given key and value is created. If an entry with the key already exists, its value is discarded and replaced with the given value.

See also value(), hasKey(), and removeValue().

Example: network/archivesearch/archivedialog.ui.h.

QString QHttpHeader::value ( const QString & key ) const
Returns the value for the entry with the given key. If no entry has this key, an empty string is returned.

See also setValue(), removeValue(), hasKey(), and keys().

SEE ALSO
http://doc.trolltech.com/qhttprequestheader.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qhttprequestheader.3qt) and the Qt version (3.3.3).