ESP32 HTTPS Server
ResourceNode.hpp
1 #ifndef SRC_RESOURCENODE_HPP_
2 #define SRC_RESOURCENODE_HPP_
3 
4 #include <string>
5 
6 #include "HTTPNode.hpp"
7 #include "HTTPSCallbackFunction.hpp"
8 
9 namespace httpsserver {
10 
16 class ResourceNode : public HTTPNode {
17 public:
18  ResourceNode(const std::string &path, const std::string &method, const HTTPSCallbackFunction * callback, const std::string &tag = "");
19  virtual ~ResourceNode();
20 
21  const std::string _method;
22  const HTTPSCallbackFunction * _callback;
23  std::string getMethod() { return _method; }
24 };
25 
26 } /* namespace httpsserver */
27 
28 #endif /* SRC_RESOURCENODE_HPP_ */
Base class for a URL/route-handler in the server.
Definition: HTTPNode.hpp:26
void() HTTPSCallbackFunction(HTTPRequest *req, HTTPResponse *res)
A callback function that will be called by the server to handle a request.
Definition: HTTPSCallbackFunction.hpp:11
This HTTPNode represents a route that maps to a regular HTTP request for a resource (static or dynami...
Definition: ResourceNode.hpp:16
Definition: ConnectionContext.cpp:3