ZenLib
ZenLib
Format
Http
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
//---------------------------------------------------------------------------
19
#include "
ZenLib/Format/Http/Http_Cookies.h
"
20
#include <string>
21
#include <ctime>
22
#include <map>
23
#include <vector>
24
//---------------------------------------------------------------------------
25
26
namespace
ZenLib
27
{
28
29
namespace
Format
30
{
31
32
namespace
Http
33
{
34
35
//***************************************************************************
36
/// @brief
37
//***************************************************************************
38
39
class
Handler
40
{
41
public
:
42
//Constructor/Destructor
43
Handler
();
44
45
//In
46
std::string
Path
;
//The path being requested by this request
47
std::map<std::string, std::string>
Request_Headers
;
//All the incoming HTTP headers from the client web browser.
48
std::map<std::string, std::string>
Request_Cookies
;
//The set of cookies that came from the client along with this request
49
std::map<std::string, std::string>
Request_Queries
;
//All the key/value pairs in the query string of this request
50
std::string
Foreign_IP
;
//The foreign ip address for this request
51
std::string
Local_IP
;
//The foreign port number for this request
52
unsigned
short
Foreign_Port
;
//The IP of the local interface this request is coming in on
53
unsigned
short
Local_Port
;
//The local port number this request is coming in on
54
bool
HeadersOnly
;
//The request requests only the header
55
56
//Out
57
size_t
Response_HTTP_Code
;
//HTTP code to be sent
58
std::map<std::string, std::string>
Response_Headers
;
//Additional headers you wish to appear in the HTTP response to this request
59
Cookies
Response_Cookies
;
//New cookies to pass back to the client along with the result of this request
60
std::string
Response_Body
;
//To be displayed as the response to this request
61
};
62
63
}
//Namespace
64
65
}
//Namespace
66
67
}
//Namespace
68
69
#endif
ZenLib::Format::Http::Handler::Handler
Handler()
ZenLib::Format::Http::Cookies
Definition:
Http_Cookies.h:55
ZenLib::Format::Http::Handler::Response_Body
std::string Response_Body
Definition:
Http_Handler.h:60
ZenLib::Format::Http::Handler::Response_Cookies
Cookies Response_Cookies
Definition:
Http_Handler.h:59
ZenLib::Format::Http::Handler::Request_Queries
std::map< std::string, std::string > Request_Queries
Definition:
Http_Handler.h:49
ZenLib::Format::Http::Handler::Local_IP
std::string Local_IP
Definition:
Http_Handler.h:51
ZenLib
Definition:
BitStream.h:23
ZenLib::Format::Http::Handler::Foreign_IP
std::string Foreign_IP
Definition:
Http_Handler.h:50
ZenLib::Format::Http::Handler::Foreign_Port
unsigned short Foreign_Port
Definition:
Http_Handler.h:52
ZenLib::Format::Http::Handler::Request_Headers
std::map< std::string, std::string > Request_Headers
Definition:
Http_Handler.h:47
ZenLib::Format::Http::Handler::Local_Port
unsigned short Local_Port
Definition:
Http_Handler.h:53
ZenLib::Format::Http::Handler::Request_Cookies
std::map< std::string, std::string > Request_Cookies
Definition:
Http_Handler.h:48
ZenLib::Format::Http::Handler::Response_Headers
std::map< std::string, std::string > Response_Headers
Definition:
Http_Handler.h:58
ZenLib::Format::Http::Handler
Definition:
Http_Handler.h:39
ZenLib::Format::Http::Handler::HeadersOnly
bool HeadersOnly
Definition:
Http_Handler.h:54
ZenLib::Format::Http::Handler::Response_HTTP_Code
size_t Response_HTTP_Code
Definition:
Http_Handler.h:57
ZenLib::Format::Http::Handler::Path
std::string Path
Definition:
Http_Handler.h:46
Http_Cookies.h
Generated by
1.8.13