blob: 8a7e1d3a8f243a5fa0764074df6e4433f7c28191 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef REQUEST_RESPONSE_H
#define REQUEST_RESPONSE_H 1
#include <event2/http.h>
#include <string>
class RequestResponse
{
public:
RequestResponse(struct evhttp_request * const req);
~RequestResponse();
void UseInputHeader();
void UseOutputHeader();
bool AddOutputHeaderByRef(std::string & key, std::string & value);
bool AddOutputHeader(std::string key, std::string value);
bool GetInputHeaderByRef(std::string & key, std::string & value);
bool GetInputHeader(std::string key, std::string value);
private:
struct evhttp_request * const m_Request;
struct evkeyvalq * m_InputHeader;
struct evkeyvalq * m_OutputHeader;
};
#endif
|