NetServices: Implement BHttpSession::Cancel()

Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
This commit is contained in:
Niels Sascha Reedijk
2022-06-03 13:38:28 +01:00
parent 2f3b9b18ac
commit 6cbbd9bf4e
5 changed files with 100 additions and 0 deletions
+36
View File
@@ -183,6 +183,42 @@ namespace Network {
*/
/*!
\fn void BHttpSession::Cancel(int32 identifier)
\brief Cancel a running request.
When a request that is scheduled or running is cancelled, its \ref BHttpResult object will
be set to the \ref BNetworkRequestError exception with the \c Cancelled type.
There are three possible outcomes:
1. If the request is not yet scheduled, then it will never start. The result will be set to
the cancelled error state.
2. If the request was started, then processing it will be terminated. The result will be set to
the cancelled error state.
3. If the request was already finished, then nothing happens. The result will keep the value it
had assigned. The same if the request identifier is invalid.
\param identifier The identifier for the request to cancel.
\exception std::bad_alloc Error in case memory cannot be allocated.
\since Haiku R1
*/
/*!
\fn void BHttpSession::Cancel(const BHttpResult& request)
\brief Cancel a running \a request.
See the \ref BHttpSession::Cancel(int32 identifier) method for more details on how this method
works.
\exception std::bad_alloc Error in case memory cannot be allocated.
\since Haiku R1
*/
} // namespace Network
} // namespace BPrivate