OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HttpRequest Class Reference

#include <http_request.h>

Collaboration diagram for HttpRequest:

Public Types

typedef std::map< std::string,
std::string > 
HeaderMap
 

Public Member Functions

 HttpRequest ()
 
void SetMethod (http_method method)
 
http_method GetMethod () const
 
void SetUrl (std::string *url)
 
void PushHeader (const std::string &key, const std::string &value)
 
void SetBody (const char *data, size_t length)
 
void SetEvent (enum TcpSession::Event event)
 
std::string ToString () const
 
std::string UrlPath () const
 
std::string UrlQuery () const
 
const HeaderMapHeaders () const
 
const std::string & Body () const
 
TcpSession::Event Event () const
 

Private Attributes

http_method method_
 
std::string url_
 
HeaderMap headers_
 
std::string body_
 
TcpSession::Event event_
 

Detailed Description

Definition at line 14 of file http_request.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> HttpRequest::HeaderMap

Definition at line 16 of file http_request.h.

Constructor & Destructor Documentation

HttpRequest::HttpRequest ( )

Definition at line 11 of file http_request.cc.

Member Function Documentation

const std::string& HttpRequest::Body ( ) const
inline

Definition at line 39 of file http_request.h.

TcpSession::Event HttpRequest::Event ( ) const
inline

Definition at line 40 of file http_request.h.

http_method HttpRequest::GetMethod ( ) const
inline

Definition at line 21 of file http_request.h.

const HeaderMap& HttpRequest::Headers ( ) const
inline

Definition at line 38 of file http_request.h.

void HttpRequest::PushHeader ( const std::string &  key,
const std::string &  value 
)
inline

Definition at line 26 of file http_request.h.

void HttpRequest::SetBody ( const char *  data,
size_t  length 
)
inline

Definition at line 29 of file http_request.h.

void HttpRequest::SetEvent ( enum TcpSession::Event  event)
inline

Definition at line 32 of file http_request.h.

void HttpRequest::SetMethod ( http_method  method)
inline

Definition at line 20 of file http_request.h.

void HttpRequest::SetUrl ( std::string *  url)
inline

Definition at line 23 of file http_request.h.

string HttpRequest::ToString ( ) const

Definition at line 15 of file http_request.cc.

string HttpRequest::UrlPath ( ) const

Definition at line 25 of file http_request.cc.

Here is the call graph for this function:

string HttpRequest::UrlQuery ( ) const

Definition at line 36 of file http_request.cc.

Here is the call graph for this function:

Member Data Documentation

std::string HttpRequest::body_
private

Definition at line 45 of file http_request.h.

TcpSession::Event HttpRequest::event_
private

Definition at line 46 of file http_request.h.

HeaderMap HttpRequest::headers_
private

Definition at line 44 of file http_request.h.

http_method HttpRequest::method_
private

Definition at line 42 of file http_request.h.

std::string HttpRequest::url_
private

Definition at line 43 of file http_request.h.


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