2017-08-09 14:33:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "IServer.h"
|
|
|
|
|
2017-09-08 11:57:43 +00:00
|
|
|
#include <Poco/Net/HTTPRequestHandler.h>
|
|
|
|
|
2017-08-09 14:33:07 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
/// Response with custom string. Can be used for browser.
|
|
|
|
class RootRequestHandler : public Poco::Net::HTTPRequestHandler
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
IServer & server;
|
|
|
|
|
|
|
|
public:
|
2017-09-07 21:04:48 +00:00
|
|
|
explicit RootRequestHandler(IServer & server_) : server(server_)
|
2017-08-09 14:33:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void handleRequest(
|
|
|
|
Poco::Net::HTTPServerRequest & request,
|
|
|
|
Poco::Net::HTTPServerResponse & response) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|