mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
added HTTPClientSession::flushRequest()
This commit is contained in:
parent
42cf54b742
commit
2e26da9b34
@ -258,6 +258,14 @@ public:
|
||||
/// This method should only be called if the request contains
|
||||
/// 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();
|
||||
/// 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;
|
||||
if (networkException()) networkException()->rethrow();
|
||||
}
|
||||
|
||||
|
||||
std::istream& HTTPClientSession::receiveResponse(HTTPResponse& response)
|
||||
{
|
||||
flushRequest();
|
||||
if (!_responseReceived)
|
||||
{
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user