Remove API Key and Update Callback
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "HttpReply.h"
|
||||
#include "HttpRequest.h"
|
||||
#include "HttpPostData.h"
|
||||
#include "HttpServer.h"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -14,7 +15,7 @@ namespace Http {
|
||||
class HttpRequestHandler
|
||||
{
|
||||
public:
|
||||
explicit HttpRequestHandler(std::function<std::string(const std::string&, const std::vector<HttpPostData>&)> callback);
|
||||
explicit HttpRequestHandler(HttpServer::CallbackMethod callback);
|
||||
|
||||
HttpRequestHandler(const HttpRequestHandler&) = delete;
|
||||
|
||||
@@ -22,12 +23,12 @@ public:
|
||||
|
||||
private:
|
||||
std::vector<HttpPostData> GetPostData(const std::string& boundary, const std::string& data) const;
|
||||
std::string HandlePostData(const std::string& uri, const std::vector<HttpPostData>& postData);
|
||||
HttpServer::HttpReply ForwardRequest(const std::string& uri, const std::vector<HttpPostData>& postData);
|
||||
|
||||
static bool URLDecode(const std::string& in, std::string& out);
|
||||
|
||||
private:
|
||||
std::function<std::string(const std::string&, const std::vector<HttpPostData>&)> m_callback;
|
||||
HttpServer::CallbackMethod m_callback;
|
||||
};
|
||||
|
||||
} // namespace Http
|
||||
|
||||
Reference in New Issue
Block a user