Http_Handler.h
Go to the documentation of this file.
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a zlib-style license that can
* be found in the License.txt file in the root of the source tree.
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// A HTTP Request
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//---------------------------------------------------------------------------
#ifndef ZenLib_Format_Http_RequestH
#define ZenLib_Format_Http_RequestH
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "ZenLib/Format/Http/Http_Cookies.h"
#include <vector>
//---------------------------------------------------------------------------
namespace ZenLib
{
namespace Format
{
namespace Http
{
//***************************************************************************
/// @brief
//***************************************************************************
class Handler
{
public:
//Constructor/Destructor
Handler();
//In
std::string Path; //The path being requested by this request
std::map<std::string, std::string> Request_Headers; //All the incoming HTTP headers from the client web browser.
std::map<std::string, std::string> Request_Cookies; //The set of cookies that came from the client along with this request
std::map<std::string, std::string> Request_Queries; //All the key/value pairs in the query string of this request
std::string Foreign_IP; //The foreign ip address for this request
std::string Local_IP; //The foreign port number for this request
unsigned short Foreign_Port; //The IP of the local interface this request is coming in on
unsigned short Local_Port; //The local port number this request is coming in on
bool HeadersOnly; //The request requests only the header
//Out
size_t Response_HTTP_Code; //HTTP code to be sent
std::map<std::string, std::string> Response_Headers; //Additional headers you wish to appear in the HTTP response to this request
Cookies Response_Cookies; //New cookies to pass back to the client along with the result of this request
std::string Response_Body; //To be displayed as the response to this request
};
} //Namespace
} //Namespace
} //Namespace
#endif
Http_Cookies.h
ZenLib::Format::Http::Cookies
Definition Http_Cookies.h:56
ZenLib::Format::Http::Handler::Foreign_IP
std::string Foreign_IP
Definition Http_Handler.h:47
ZenLib::Format::Http::Handler::Request_Queries
std::map< std::string, std::string > Request_Queries
Definition Http_Handler.h:46
ZenLib::Format::Http::Handler::Response_Body
std::string Response_Body
Definition Http_Handler.h:57
ZenLib::Format::Http::Handler::Local_IP
std::string Local_IP
Definition Http_Handler.h:48
ZenLib::Format::Http::Handler::Request_Headers
std::map< std::string, std::string > Request_Headers
Definition Http_Handler.h:44
ZenLib::Format::Http::Handler::Response_Cookies
Cookies Response_Cookies
Definition Http_Handler.h:56
ZenLib::Format::Http::Handler::Response_HTTP_Code
size_t Response_HTTP_Code
Definition Http_Handler.h:54
ZenLib::Format::Http::Handler::Handler
Handler()
ZenLib::Format::Http::Handler::HeadersOnly
bool HeadersOnly
Definition Http_Handler.h:51
ZenLib::Format::Http::Handler::Request_Cookies
std::map< std::string, std::string > Request_Cookies
Definition Http_Handler.h:45
ZenLib::Format::Http::Handler::Local_Port
unsigned short Local_Port
Definition Http_Handler.h:50
ZenLib::Format::Http::Handler::Path
std::string Path
Definition Http_Handler.h:43
ZenLib::Format::Http::Handler::Response_Headers
std::map< std::string, std::string > Response_Headers
Definition Http_Handler.h:55
ZenLib::Format::Http::Handler::Foreign_Port
unsigned short Foreign_Port
Definition Http_Handler.h:49
ZenLib::Format::Http
Definition Http_Cookies.h:32
ZenLib::Format
Definition Html_Handler.h:29
ZenLib
Definition BitStream.h:24