#include <RequestHeader.h> [code]
Inherits Http::Header.
Inheritance diagram for Http::RequestHeader:


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().
Definition at line 58 of file RequestHeader.h.
Public Member Functions | |
| RequestHeader () | |
| RequestHeader (const QString &method, const QString &path, int majorVersion=1, int minorVersion=1) | |
| RequestHeader (const RequestHeader &header) | |
| RequestHeader (const QString &str) | |
| ~RequestHeader () | |
| Destructor. | |
| RequestHeader & | operator= (const RequestHeader &header) |
| void | setRequestLine (const QString &method, const QString &path, int majorVersion=1, int minorVersion=1) |
| QString | method () const |
| QString | path () const |
| int | majorVersion () const |
| int | minorVersion () const |
| QString | toString () const |
Protected Member Functions | |
| bool | parseLine (const QString &line, int number) |
Private Attributes | |
| auto_ptr< RequestHeaderPrivate > | d |
|
|
Constructs an empty HTTP request header. Definition at line 46 of file RequestHeader.cpp. |
|
||||||||||||||||||||
|
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. Definition at line 56 of file RequestHeader.cpp. |
|
|
Constructs a copy of header. Definition at line 68 of file RequestHeader.cpp. |
|
|
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. Definition at line 103 of file RequestHeader.cpp. |
|
|
Destructor.
Definition at line 78 of file RequestHeader.cpp. |
|
|
Returns the major protocol-version of the HTTP request header.
Definition at line 157 of file RequestHeader.cpp. |
|
|
Returns the method of the HTTP request header.
Definition at line 135 of file RequestHeader.cpp. |
|
|
Returns the minor protocol-version of the HTTP request header.
Definition at line 168 of file RequestHeader.cpp. |
|
|
Copies the content of header into this RequestHeader Definition at line 86 of file RequestHeader.cpp. |
|
||||||||||||
|
Reimplemented from Http::Header. Definition at line 176 of file RequestHeader.cpp. |
|
|
Returns the request-URI of the HTTP request header.
Definition at line 146 of file RequestHeader.cpp. |
|
||||||||||||||||||||
|
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.
Definition at line 117 of file RequestHeader.cpp. |
|
|
Reimplemented from Http::Header. Definition at line 205 of file RequestHeader.cpp. |
|
|
Reimplemented from Http::Header. Definition at line 88 of file RequestHeader.h. |