Changeset View
Changeset View
Standalone View
Standalone View
src/httpserver.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
* Thin C++ wrapper around evhttp_request. | * Thin C++ wrapper around evhttp_request. | ||||
*/ | */ | ||||
class HTTPRequest { | class HTTPRequest { | ||||
private: | private: | ||||
struct evhttp_request *req; | struct evhttp_request *req; | ||||
bool replySent; | bool replySent; | ||||
public: | public: | ||||
HTTPRequest(struct evhttp_request *req); | explicit HTTPRequest(struct evhttp_request *req); | ||||
~HTTPRequest(); | ~HTTPRequest(); | ||||
enum RequestMethod { UNKNOWN, GET, POST, HEAD, PUT, OPTIONS }; | enum RequestMethod { UNKNOWN, GET, POST, HEAD, PUT, OPTIONS }; | ||||
/** Get requested URI */ | /** Get requested URI */ | ||||
std::string GetURI(); | std::string GetURI(); | ||||
/** Get CService (address:ip) for the origin of the http request */ | /** Get CService (address:ip) for the origin of the http request */ | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |