ZenLib
Http_Handler.h
Go to the documentation of this file.
1/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
2 *
3 * Use of this source code is governed by a zlib-style license that can
4 * be found in the License.txt file in the root of the source tree.
5 */
6
7//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8//
9// A HTTP Request
10//
11//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
13//---------------------------------------------------------------------------
14#ifndef ZenLib_Format_Http_RequestH
15#define ZenLib_Format_Http_RequestH
16//---------------------------------------------------------------------------
17
18//---------------------------------------------------------------------------
20#include <vector>
21//---------------------------------------------------------------------------
22
23namespace ZenLib
24{
25
26namespace Format
27{
28
29namespace Http
30{
31
32//***************************************************************************
33/// @brief
34//***************************************************************************
35
37{
38public:
39 //Constructor/Destructor
41
42 //In
43 std::string Path; //The path being requested by this request
44 std::map<std::string, std::string> Request_Headers; //All the incoming HTTP headers from the client web browser.
45 std::map<std::string, std::string> Request_Cookies; //The set of cookies that came from the client along with this request
46 std::map<std::string, std::string> Request_Queries; //All the key/value pairs in the query string of this request
47 std::string Foreign_IP; //The foreign ip address for this request
48 std::string Local_IP; //The foreign port number for this request
49 unsigned short Foreign_Port; //The IP of the local interface this request is coming in on
50 unsigned short Local_Port; //The local port number this request is coming in on
51 bool HeadersOnly; //The request requests only the header
52
53 //Out
54 size_t Response_HTTP_Code; //HTTP code to be sent
55 std::map<std::string, std::string> Response_Headers; //Additional headers you wish to appear in the HTTP response to this request
56 Cookies Response_Cookies; //New cookies to pass back to the client along with the result of this request
57 std::string Response_Body; //To be displayed as the response to this request
58};
59
60} //Namespace
61
62} //Namespace
63
64} //Namespace
65
66#endif
Definition Http_Cookies.h:56
Definition Http_Handler.h:37
std::string Foreign_IP
Definition Http_Handler.h:47
std::map< std::string, std::string > Request_Queries
Definition Http_Handler.h:46
std::string Response_Body
Definition Http_Handler.h:57
std::string Local_IP
Definition Http_Handler.h:48
std::map< std::string, std::string > Request_Headers
Definition Http_Handler.h:44
Cookies Response_Cookies
Definition Http_Handler.h:56
size_t Response_HTTP_Code
Definition Http_Handler.h:54
bool HeadersOnly
Definition Http_Handler.h:51
std::map< std::string, std::string > Request_Cookies
Definition Http_Handler.h:45
unsigned short Local_Port
Definition Http_Handler.h:50
std::string Path
Definition Http_Handler.h:43
std::map< std::string, std::string > Response_Headers
Definition Http_Handler.h:55
unsigned short Foreign_Port
Definition Http_Handler.h:49
Definition BitStream.h:24