A http request.
More...
#include <libppbase/base_http/HTTPRequest.h>
List of all members.
Detailed Description
A http request.
- Author:
- Christoph Schwarz
- Version:
- $Id: HTTPRequest.h 21 2010-09-05 04:18:17Z cschwarz1 $
Member Function Documentation
void base_http::HTTPRequest::add |
( |
HTTPPart * |
part, |
|
|
bool |
own = false | |
|
) |
| | |
Adds a mime part at the end of the part list.
- Parameters:
-
| part | the mime part to add |
| own | flag: this object owns the part (=deletes it when this object is deleted) |
int base_http::HTTPRequest::authenticate |
( |
const char * |
realm, |
|
|
const char * |
password, |
|
|
const char * |
lastnonce | |
|
) |
| | |
Checks authentication.
- Parameters:
-
| realm | the realm |
| password | the password |
| lastnonce | the last nonce |
- Returns:
- 1=ok, 0=bad username or password, <0=other error
Returns username and password from the basic authorization header.
- Parameters:
-
| username | returns the username |
| password | returns the password |
- Returns:
- true if a authorization header with basic authorization was found, false if not
const char* base_http::HTTPRequest::getBoundary |
( |
|
) |
const |
Returns the mime boundary.
- Returns:
- the mime boundary
Returns the username and response from the digest authorization header.
- Parameters:
-
| username | returns the username |
| response | returns the response |
- Returns:
- true if a authorization header with digest authorization was found, false if not
int base_http::HTTPRequest::getMajorVersion |
( |
|
) |
const |
Returns the major protocol version.
- Returns:
- the major protocol version
const char* base_http::HTTPRequest::getMethod |
( |
|
) |
const |
Returns the http method.
- Returns:
- the http method (GET, POST, ...)
int base_http::HTTPRequest::getMinorVersion |
( |
|
) |
const |
Returns the minor protocol version.
- Returns:
- the minor protocol version
Returns a named mime part.
- Parameters:
-
- Returns:
- NULL if there is no such part
std::vector<HTTPPart*> base_http::HTTPRequest::getParts |
( |
|
) |
const |
Returns all mime parts.
- Returns:
- a vector containing all mime parts
const char* base_http::HTTPRequest::getProtocol |
( |
|
) |
const |
Returns the http protocol string.
- Returns:
- the http protocol string
const char* base_http::HTTPRequest::getURI |
( |
|
) |
const |
Returns the http request uri.
- Returns:
- the http request uri
void base_http::HTTPRequest::insert |
( |
HTTPPart * |
part, |
|
|
bool |
own = false | |
|
) |
| | |
Inserts a new mime part as first part.
- Parameters:
-
| part | the new mime part |
| own | flag: this object owns the part (=deletes it when this object is deleted) |
Parses the authorization header.
- Parameters:
-
| header | the authorization header |
| method | returns the authorization method |
| args | returns arguments of the header |
- Returns:
- true if an authorization header was found, false if not
void base_http::HTTPRequest::setBoundary |
( |
const char * |
boundary |
) |
|
Sets a mime boundary.
- Parameters:
-
| boundary | the boundary to use |
void base_http::HTTPRequest::setMethod |
( |
const char * |
method |
) |
|
Sets a http method.
- Parameters:
-
void base_http::HTTPRequest::setProtocol |
( |
const char * |
protocol |
) |
|
Sets a http protocol string.
- Parameters:
-
| protocol | the http protocol string |
void base_http::HTTPRequest::setURI |
( |
const char * |
uri |
) |
|
Sets a http uri.
- Parameters:
-
size_t base_http::HTTPRequest::size |
( |
|
) |
const |
Returns the size of this request.
- Returns:
- the size in bytes
Reimplemented from base_http::HTTPPart.
The documentation for this class was generated from the following file: