Public Member Functions | Static Public Attributes | Private Types | Private Attributes

ACE::HTTP::Request Class Reference

#include <HTTP_Request.h>

Inheritance diagram for ACE::HTTP::Request:
Inheritance graph
[legend]
Collaboration diagram for ACE::HTTP::Request:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Request ()
 Constructor; creates a GET / HTTP/1.0 HTTP request.
 Request (const ACE_CString &version)
 Constructor; creates a GET request with given version.
 Request (const ACE_CString &method, const ACE_CString &uri)
 Constructor; creates a HTTP/1.0 request with given method and URI.
 Request (const ACE_CString &method, const ACE_CString &uri, const ACE_CString &version)
 Constructor; creates an HTTP request with given method, URI and version.
virtual ~Request ()
 Destructor.
void reset ()
 Reset the request object.
void reset (const ACE_CString &version)
void reset (const ACE_CString &method, const ACE_CString &uri)
void reset (const ACE_CString &method, const ACE_CString &uri, const ACE_CString &version)
void set_method (const ACE_CString &method)
 Set the method.
const ACE_CStringget_method () const
 Return the method.
void set_URI (const ACE_CString &uri)
 Set the request URI.
const ACE_CStringget_URI () const
 Return the request URI.
void set_host (const ACE_CString &host)
 Set the Host header field.
void set_host (const ACE_CString &host, u_short port)
bool has_host () const
 Returns true if Host header field has been set.
ACE_CString get_host () const
 Returns the value of the Host header field.
void add_cookie (const ACE_CString &cookie)
 Adds a Cookie header.
void get_cookies (ACE_Array< ACE_CString > &cookies) const
 Get cookies from Cookie header(s).
bool has_credentials () const
void get_credentials (ACE_CString &scheme, ACE_CString &auth_info) const
 Returns the authentication scheme and authentication information.
void set_credentials (const ACE_CString &scheme, const ACE_CString &auth_info)
 Set the authentication scheme and information.
void write (std::ostream &str) const
 Writes the HTTP request to the given stream.
bool read (std::istream &str)

Static Public Attributes

static const ACE_CString HTTP_GET = "GET"
static const ACE_CString HTTP_HEAD = "HEAD"
static const ACE_CString HTTP_PUT = "PUT"
static const ACE_CString HTTP_POST = "POST"
static const ACE_CString HTTP_OPTIONS = "OPTIONS"
static const ACE_CString HTTP_DELETE = "DELETE"
static const ACE_CString HTTP_TRACE = "TRACE"
static const ACE_CString HTTP_CONNECT = "CONNECT"
static const ACE_CString HOST = "Host"
static const ACE_CString COOKIE = "Cookie"
static const ACE_CString AUTHORIZATION = "Authorization"

Private Types

enum  Limits { MAX_METHOD_LENGTH = 32, MAX_URI_LENGTH = 4096, MAX_VERSION_LENGTH = 8 }
 

Limits for reading a header.

More...

Private Attributes

ACE_CString method_
ACE_CString uri_

Member Enumeration Documentation

Limits for reading a header.

Enumerator:
MAX_METHOD_LENGTH 
MAX_URI_LENGTH 
MAX_VERSION_LENGTH 

Reimplemented from ACE::INet::HeaderBase.


Constructor & Destructor Documentation

ACE::HTTP::Request::Request (  ) 

Constructor; creates a GET / HTTP/1.0 HTTP request.

ACE::HTTP::Request::Request ( const ACE_CString version  ) 

Constructor; creates a GET request with given version.

ACE::HTTP::Request::Request ( const ACE_CString method,
const ACE_CString uri 
)

Constructor; creates a HTTP/1.0 request with given method and URI.

ACE::HTTP::Request::Request ( const ACE_CString method,
const ACE_CString uri,
const ACE_CString version 
)

Constructor; creates an HTTP request with given method, URI and version.

ACE::HTTP::Request::~Request (  )  [virtual]

Destructor.


Member Function Documentation

void ACE::HTTP::Request::add_cookie ( const ACE_CString cookie  ) 

Adds a Cookie header.

void ACE::HTTP::Request::get_cookies ( ACE_Array< ACE_CString > &  cookies  )  const

Get cookies from Cookie header(s).

void ACE::HTTP::Request::get_credentials ( ACE_CString scheme,
ACE_CString auth_info 
) const

Returns the authentication scheme and authentication information.

ACE_CString ACE::HTTP::Request::get_host (  )  const [inline]

Returns the value of the Host header field.

const ACE_CString & ACE::HTTP::Request::get_method (  )  const [inline]

Return the method.

const ACE_CString & ACE::HTTP::Request::get_URI (  )  const [inline]

Return the request URI.

bool ACE::HTTP::Request::has_credentials (  )  const [inline]

Returns true if the request contains authentication information in the form of an Authorization header.

bool ACE::HTTP::Request::has_host (  )  const [inline]

Returns true if Host header field has been set.

bool ACE::HTTP::Request::read ( std::istream &  str  )  [virtual]

Reads the HTTP request from the given stream.

Reimplemented from ACE::INet::HeaderBase.

void ACE::HTTP::Request::reset ( const ACE_CString version  )  [inline]
void ACE::HTTP::Request::reset ( const ACE_CString method,
const ACE_CString uri 
) [inline]
void ACE::HTTP::Request::reset (  )  [inline]

Reset the request object.

void ACE::HTTP::Request::reset ( const ACE_CString method,
const ACE_CString uri,
const ACE_CString version 
) [inline]
void ACE::HTTP::Request::set_credentials ( const ACE_CString scheme,
const ACE_CString auth_info 
)

Set the authentication scheme and information.

void ACE::HTTP::Request::set_host ( const ACE_CString host,
u_short  port 
)
void ACE::HTTP::Request::set_host ( const ACE_CString host  )  [inline]

Set the Host header field.

void ACE::HTTP::Request::set_method ( const ACE_CString method  )  [inline]

Set the method.

void ACE::HTTP::Request::set_URI ( const ACE_CString uri  )  [inline]

Set the request URI.

void ACE::HTTP::Request::write ( std::ostream &  str  )  const [virtual]

Writes the HTTP request to the given stream.

Reimplemented from ACE::INet::HeaderBase.


Member Data Documentation

const ACE_CString ACE::HTTP::Request::AUTHORIZATION = "Authorization" [static]
const ACE_CString ACE::HTTP::Request::COOKIE = "Cookie" [static]
const ACE_CString ACE::HTTP::Request::HOST = "Host" [static]
const ACE_CString ACE::HTTP::Request::HTTP_CONNECT = "CONNECT" [static]
const ACE_CString ACE::HTTP::Request::HTTP_DELETE = "DELETE" [static]
const ACE_CString ACE::HTTP::Request::HTTP_GET = "GET" [static]
const ACE_CString ACE::HTTP::Request::HTTP_HEAD = "HEAD" [static]
const ACE_CString ACE::HTTP::Request::HTTP_OPTIONS = "OPTIONS" [static]
const ACE_CString ACE::HTTP::Request::HTTP_POST = "POST" [static]
const ACE_CString ACE::HTTP::Request::HTTP_PUT = "PUT" [static]
const ACE_CString ACE::HTTP::Request::HTTP_TRACE = "TRACE" [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines