bool Client::executeQuery(const InterserverIOEndpointLocation & location, const std::string & query) { ReadBufferFromHTTP::Params params = { {"endpoint", getEndpointId(location.name)}, {"compress", "false"}, {"query", query} }; ReadBufferFromHTTP in{location.host, location.port, params}; bool flag; readBinary(flag, in); assertEOF(in); return flag; }
bool Client::executeQuery(const InterserverIOEndpointLocation & location, const std::string & query) { Poco::URI uri; uri.setScheme("http"); uri.setHost(location.host); uri.setPort(location.port); uri.setQueryParameters( { {"endpoint", getEndpointId(location.name)}, {"compress", "false"}, {"query", query} }); ReadWriteBufferFromHTTP in{uri, Poco::Net::HTTPRequest::HTTP_POST}; bool flag; readBinary(flag, in); assertEOF(in); return flag; }
std::string Service::getId(const std::string & node_id) const { return getEndpointId(node_id); }