This class provides hooks into the web server so get and post requests can be passed into family modules.
More...
#include <IWebserverEventSink.h>
This class provides hooks into the web server so get and post requests can be passed into family modules.
§ ~IWebserverEventSink()
virtual BaseLib::Rpc::IWebserverEventSink::~IWebserverEventSink |
( |
| ) |
|
|
inlinevirtual |
§ onGet()
virtual bool BaseLib::Rpc::IWebserverEventSink::onGet |
( |
PServerInfo & |
serverInfo, |
|
|
Http & |
httpRequest, |
|
|
std::shared_ptr< TcpSocket > & |
socket, |
|
|
std::string & |
path |
|
) |
| |
|
inlinevirtual |
Called on every HTTP GET request processed by the web server.
- Parameters
-
serverInfo | Information about the RPC server. |
httpRequest | The http request received by the webserver. |
socket | The socket to the client. |
path | The GET path called by the client. |
- Returns
- Return true when the request was handled. When false is returned, the request will be handled by the web server.
§ onPost()
virtual bool BaseLib::Rpc::IWebserverEventSink::onPost |
( |
PServerInfo & |
serverInfo, |
|
|
Http & |
httpRequest, |
|
|
std::shared_ptr< TcpSocket > & |
socket, |
|
|
std::string & |
path |
|
) |
| |
|
inlinevirtual |
Called on every HTTP POST request processed by the web server.
- Parameters
-
serverInfo | Information about the RPC server. |
httpRequest | The http request received by the webserver. |
socket | The socket to the client. |
path | The POST path called by the client. |
- Returns
- Return true when the request was handled. When false is returned, the request will be handled by the web server.
The documentation for this class was generated from the following file: