Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
httpserver.h
Go to the documentation of this file.
45 void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPRequestHandler &handler);
137 HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const std::function<void(void)>& handler);
std::pair< bool, std::string > GetHeader(const std::string &hdr)
Get the request header specified by hdr, or an empty string.
Definition: httpserver.cpp:532
Definition: httpserver.h:70
void UnregisterHTTPHandler(const std::string &prefix, bool exactMatch)
Unregister handler for prefix.
Definition: httpserver.cpp:651
Definition: httpserver.h:71
Definition: httpserver.h:69
Definition: httpserver.h:68
void WriteReply(int nStatus, const std::string &strReply="")
Write HTTP reply.
Definition: httpserver.cpp:575
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:143
virtual void operator()()=0
CService GetPeer()
Get CService (address:ip) for the origin of the http request.
Definition: httpserver.cpp:605
void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPRequestHandler &handler)
Register handler for prefix.
Definition: httpserver.cpp:645
void WriteHeader(const std::string &hdr, const std::string &value)
Write output header.
Definition: httpserver.cpp:563
bool UpdateHTTPServerLogging(bool enable)
Change logging level for libevent.
Definition: httpserver.cpp:413
HTTPEvent(struct event_base *base, bool deleteWhenTriggered, const std::function< void(void)> &handler)
Create a new event.
Definition: httpserver.cpp:501
Definition: httpserver.h:72
std::function< bool(HTTPRequest *req, const std::string &)> HTTPRequestHandler
Handler for requests to a certain HTTP path.
Definition: httpserver.h:40