73 public Poco::Net::HTTPRequestHandler
76 HttpResolver(
const std::string& name,
int argc,
const char*
const* argv,
const std::string& prefix );
80 static std::shared_ptr<HttpResolver>
init_resolver(
int argc,
const char*
const* argv,
const std::string& prefix =
"httpresolver-" );
85 inline std::shared_ptr<DebugStream> log()
90 virtual void handleRequest( Poco::Net::HTTPServerRequest& req, Poco::Net::HTTPServerResponse& resp )
override;
96 Poco::JSON::Object::Ptr respError( Poco::Net::HTTPServerResponse& resp, Poco::Net::HTTPResponse::HTTPStatus s,
const std::string& message );
97 Poco::JSON::Object::Ptr httpGetRequest(
const std::string& cmd,
const Poco::URI::QueryParameters& p );
98 Poco::JSON::Object::Ptr httpJsonResolve(
const std::string& query,
const Poco::URI::QueryParameters& p );
99 std::string httpTextResolve(
const std::string& query,
const Poco::URI::QueryParameters& p );
101 std::shared_ptr<Poco::Net::HTTPServer> httpserv;
102 std::string httpHost = {
"" };
103 int httpPort = { 8008 };
104 std::string httpCORS_allow = {
"*" };
105 std::string httpReplyAddr = {
"" };
107 std::shared_ptr<DebugStream> rlog;
110 std::shared_ptr<IORFile> iorfile;
113 public Poco::Net::HTTPRequestHandlerFactory
119 virtual Poco::Net::HTTPRequestHandler* createRequestHandler(
const Poco::Net::HTTPServerRequest& req )
override;
static std::shared_ptr< HttpResolver > init_resolver(int argc, const char *const *argv, const std::string &prefix="httpresolver-")
Definition HttpResolver.cc:123