mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
added HTTPClientSession::flushRequest()
This commit is contained in:
@@ -258,6 +258,14 @@ public:
|
|||||||
/// This method should only be called if the request contains
|
/// This method should only be called if the request contains
|
||||||
/// a "Expect: 100-continue" header.
|
/// a "Expect: 100-continue" header.
|
||||||
|
|
||||||
|
void flushRequest();
|
||||||
|
/// Flushes the request stream.
|
||||||
|
///
|
||||||
|
/// Normally this method does not need to be called.
|
||||||
|
/// It can be used to ensure the request has been
|
||||||
|
/// fully sent if receiveResponse() is not called, e.g.,
|
||||||
|
/// because the underlying socket will be detached.
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
/// Resets the session and closes the socket.
|
/// Resets the session and closes the socket.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -283,11 +283,16 @@ std::ostream& HTTPClientSession::sendRequestImpl(const HTTPRequest& request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::istream& HTTPClientSession::receiveResponse(HTTPResponse& response)
|
void HTTPClientSession::flushRequest()
|
||||||
{
|
{
|
||||||
_pRequestStream = 0;
|
_pRequestStream = 0;
|
||||||
if (networkException()) networkException()->rethrow();
|
if (networkException()) networkException()->rethrow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::istream& HTTPClientSession::receiveResponse(HTTPResponse& response)
|
||||||
|
{
|
||||||
|
flushRequest();
|
||||||
if (!_responseReceived)
|
if (!_responseReceived)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user