the usual sample code for using HTTPClientSession goes something like this:
Poco::Net::HTTPClientSession session(uri.getHost(), uri.getPort());
std::ostream& ostr = session.sendRequest(req);
// Receive the response.
Poco::Net::HTTPResponse res;
std::istream& rs = session.receiveResponse(res);
the question is, how can I read from the rs input stream the entire data, while making sure that all of operations are non-blocking, so that I can cancel them at any time?