Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Net::HTTPServerRequest Class Reference

#include <HTTPServerRequest.h>

Inheritance diagram for Poco::Net::HTTPServerRequest:

Poco::Net::HTTPRequest Poco::Net::HTTPMessage Poco::Net::MessageHeader Poco::Net::NameValueCollection

List of all members.


Detailed Description

This subclass of HTTPRequest is used for representing server-side HTTP requests.

A HTTPServerRequest is passed to the handleRequest() method of HTTPRequestHandler.

Definition at line 57 of file HTTPServerRequest.h.


Public Types

typedef HeaderMap::const_iterator ConstIterator
typedef std::multimap
< std::string, std::string,
ILT > 
HeaderMap
typedef HeaderMap::iterator Iterator

Public Member Functions

void add (const std::string &name, const std::string &value)
 Sets the value of the (first) name-value pair with the given name.
ConstIterator begin () const
void clear ()
 Removes all name-value pairs with the given name.
const SocketAddressclientAddress () const
bool empty () const
ConstIterator end () const
void erase (const std::string &name)
bool expectContinue () const
ConstIterator find (const std::string &name) const
const std::string & get (const std::string &name, const std::string &defaultValue) const
const std::string & get (const std::string &name) const
 Adds a new name-value pair with the given name and value.
bool getChunkedTransferEncoding () const
int getContentLength () const
const std::string & getContentType () const
 Sets the content type for this message.
void getCookies (NameValueCollection &cookies) const
void getCredentials (std::string &scheme, std::string &authInfo) const
const std::string & getHost () const
 Sets the value of the Host header field.
bool getKeepAlive () const
const std::string & getMethod () const
 Sets the method.
const std::string & getTransferEncoding () const
const std::string & getURI () const
 Sets the request URI.
const std::string & getVersion () const
 Sets the HTTP version for this message.
bool has (const std::string &name) const
bool hasCredentials () const
 HTTPServerRequest (HTTPServerSession &session, HTTPServerParams *pParams)
const std::string & operator[] (const std::string &name) const
 Swaps the NameValueCollection with another one.
void read (std::istream &istr)
const SocketAddressserverAddress () const
 Returns the client's address.
const HTTPServerParamsserverParams () const
 Returns the server's address.
void set (const std::string &name, const std::string &value)
void setChunkedTransferEncoding (bool flag)
void setContentLength (int length)
 Returns the HTTP version for this message.
void setContentType (const MediaType &mediaType)
void setContentType (const std::string &mediaType)
void setCookies (const NameValueCollection &cookies)
void setCredentials (const std::string &scheme, const std::string &authInfo)
void setHost (const std::string &host, Poco::UInt16 port)
 Sets the value of the Host header field.
void setHost (const std::string &host)
 Returns the request URI.
void setKeepAlive (bool keepAlive)
void setMethod (const std::string &method)
 Destroys the HTTPRequest.
void setTransferEncoding (const std::string &transferEncoding)
void setURI (const std::string &uri)
 Returns the method.
void setVersion (const std::string &version)
int size () const
 Returns true iff the header does not have any content.
std::istream & stream ()
 Destroys the HTTPServerRequest.
void swap (NameValueCollection &nvc)
 Assigns the name-value pairs of another NameValueCollection to this one.
void write (std::ostream &ostr) const
 ~HTTPServerRequest ()

Static Public Member Functions

static void quote (const std::string &value, std::string &result, bool allowSpace=false)
static void splitElements (const std::string &s, std::vector< std::string > &elements, bool ignoreEmpty=true)
static void splitParameters (const std::string::const_iterator &begin, const std::string::const_iterator &end, NameValueCollection &parameters)
static void splitParameters (const std::string &s, std::string &value, NameValueCollection &parameters)

Static Public Attributes

static const std::string AUTHORIZATION = "Authorization"
static const std::string CHUNKED_TRANSFER_ENCODING = "chunked"
static const std::string CONNECTION = "Connection"
static const std::string CONNECTION_CLOSE = "Close"
static const std::string CONNECTION_KEEP_ALIVE = "Keep-Alive"
static const std::string CONTENT_LENGTH = "Content-Length"
static const std::string CONTENT_TYPE = "Content-Type"
static const std::string COOKIE = "Cookie"
static const std::string HOST = "Host"
static const std::string HTTP_1_0 = "HTTP/1.0"
static const std::string HTTP_1_1 = "HTTP/1.1"
static const std::string HTTP_CONNECT = "CONNECT"
static const std::string HTTP_DELETE = "DELETE"
static const std::string HTTP_GET = "GET"
static const std::string HTTP_HEAD = "HEAD"
static const std::string HTTP_OPTIONS = "OPTIONS"
static const std::string HTTP_POST = "POST"
static const std::string HTTP_PUT = "PUT"
static const std::string HTTP_TRACE = "TRACE"
static const std::string IDENTITY_TRANSFER_ENCODING = "identity"
static const std::string TRANSFER_ENCODING = "Transfer-Encoding"
static const int UNKNOWN_CONTENT_LENGTH = -1
static const std::string UNKNOWN_CONTENT_TYPE

Private Attributes

SocketAddress _clientAddress
HTTPServerParams_pParams
std::istream * _pStream
 Returns a reference to the server parameters.
SocketAddress _serverAddress

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index