Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

Q3HttpRequestHeader Class

TheQ3HttpRequestHeader class contains request header information for HTTP.More...

Header:#include <Q3HttpRequestHeader>
Inherits:Q3HttpHeader

Public Functions

Q3HttpRequestHeader()
Q3HttpRequestHeader(const QString & method, const QString & path, int majorVer = 1, int minorVer = 1)
Q3HttpRequestHeader(const Q3HttpRequestHeader & header)
Q3HttpRequestHeader(const QString & str)
QStringmethod() const
QStringpath() const
voidsetRequest(const QString & method, const QString & path, int majorVer = 1, int minorVer = 1)

Reimplemented Public Functions

virtual intmajorVersion() const
virtual intminorVersion() const
virtual QStringtoString() const

Detailed Description

TheQ3HttpRequestHeader class contains request header information for HTTP.

This class is used in theQ3Http 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 usingsetRequest(). The values can be obtained usingmethod(),path(),majorVersion() andminorVersion().

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

See alsoQ3HttpResponseHeader andQ3Http.

Member Function Documentation

Q3HttpRequestHeader::Q3HttpRequestHeader()

Constructs an empty HTTP request header.

Q3HttpRequestHeader::Q3HttpRequestHeader(constQString & method, constQString & path,int majorVer = 1,int minorVer = 1)

Constructs a HTTP request header for the methodmethod, the request-URIpath and the protocol-versionmajorVer andminorVer.

Q3HttpRequestHeader::Q3HttpRequestHeader(constQ3HttpRequestHeader & header)

Constructs a copy ofheader.

Q3HttpRequestHeader::Q3HttpRequestHeader(constQString & str)

Constructs a HTTP request header from the stringstr. Thestr 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.

[virtual]int Q3HttpRequestHeader::majorVersion() const

Reimplemented fromQ3HttpHeader::majorVersion().

Returns the major protocol-version of the HTTP request header.

See alsominorVersion(),method(),path(), andsetRequest().

QString Q3HttpRequestHeader::method() const

Returns the method of the HTTP request header.

See alsopath(),majorVersion(),minorVersion(), andsetRequest().

[virtual]int Q3HttpRequestHeader::minorVersion() const

Reimplemented fromQ3HttpHeader::minorVersion().

Returns the minor protocol-version of the HTTP request header.

See alsomajorVersion(),method(),path(), andsetRequest().

QString Q3HttpRequestHeader::path() const

Returns the request-URI of the HTTP request header.

See alsomethod(),majorVersion(),minorVersion(), andsetRequest().

void Q3HttpRequestHeader::setRequest(constQString & method, constQString & path,int majorVer = 1,int minorVer = 1)

This function sets the request method tomethod, the request-URI topath and the protocol-version tomajorVer andminorVer.

See alsomethod(),path(),majorVersion(), andminorVersion().

[virtual]QString Q3HttpRequestHeader::toString() const

Reimplemented fromQ3HttpHeader::toString().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp