Qt:Документация 4.3.2/qhttprequestheader

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QHttpRequestHeader Class Reference
[модуль QtNetwork ]

The QHttpRequestHeader class contains request header information for HTTP. Далее...

 #include <QHttpRequestHeader>

Inherits QHttpHeader.

[править] Открытые функции


[править] Подробное описание

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

Important inherited functions: setValue() and value().

See also QHttpResponseHeader and QHttp.


[править] Описание функций-членов

[править]
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.

Reimplemented from QHttpHeader.

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

[править]
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.

Reimplemented from QHttpHeader.

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

[править]
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().

[править]
QHttpRequestHeader & QHttpRequestHeader::operator= ( const QHttpRequestHeader & header )

Copies the content of header into this QHttpRequestHeader



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2