MCPcopy Create free account
hub / github.com/ByConity/ByConity / handleRequest

Method handleRequest

src/Server/NotFoundHandler.cpp:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace DB
7{
8void NotFoundHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse & response)
9{
10 try
11 {
12 response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_NOT_FOUND);
13 *response.send() << "There is no handle " << request.getURI() << "\n\n"
14 << "Use / or /ping for health checks.\n"
15 << "Or /replicas_status for more sophisticated health checks.\n\n"
16 << "Send queries from your program with POST method or GET /?query=...\n\n"
17 << "Use clickhouse-client:\n\n"
18 << "For interactive data analysis:\n"
19 << " clickhouse-client\n\n"
20 << "For batch query processing:\n"
21 << " clickhouse-client --query='SELECT 1' > result\n"
22 << " clickhouse-client < query > result\n";
23 }
24 catch (...)
25 {
26 tryLogCurrentException("NotFoundHandler");
27 }
28}
29
30}

Callers

nothing calls this directly

Calls 2

tryLogCurrentExceptionFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected