haiku/headers/private/netservices
Leorize 78b1442051 libbnetapi: BUrlRequest now outputs to BDataIO
Previously, BUrlRequest returns data received via a callback that can't
return any value. This approach have several issues:

- It's not possible to signify failures to the request.
- Users have to implement custom listeners just to handle the common
  case of outputting to a buffer/file/etc.
- The received data has to be serialized into BMessage when
  BUrlProtocolDispatchingListener is employed. This can cause a
  noticible slowdown in real-world scenarios as evident by #10748.

With this change, BUrlRequest will output directly into a BDataIO, which
exposes a richer API for request handlers to work with (for example a
BitTorrent client can request a BPositionIO for non-linear data
delivery), as well as simplifying common cases for users.

The adaptation only requires one additional API:
BHttpRequest::SetStopOnError(). This API simply instructs the HTTP
request handler to cancel the request if an HTTP error is occurred.

Change-Id: I4160884d77bff0e7678e0a623e2587987704443a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3084
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
..
DataRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
FileRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
Geolocation.h libnetservices.a: move BGeoLocation from libshared.a 2021-01-27 19:53:11 +00:00
GopherRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
HttpAuthentication.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
HttpForm.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
HttpHeaders.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
HttpRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
HttpResult.h libbnetservices: BUrlResult is no longer a BArchivable 2021-02-28 20:39:31 +00:00
HttpTime.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
NetworkCookie.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
NetworkCookieJar.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
NetworkRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlContext.h libnetservices.a: Put the experimental API into BPrivate::Network namespace 2021-01-27 19:53:11 +00:00
UrlProtocolAsynchronousListener.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlProtocolDispatchingListener.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlProtocolListener.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlProtocolRoster.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00
UrlResult.h libbnetservices: BUrlResult is no longer a BArchivable 2021-02-28 20:39:31 +00:00
UrlSynchronousRequest.h libbnetapi: BUrlRequest now outputs to BDataIO 2021-02-28 20:39:31 +00:00