HTTPClientCopyingDelegate
An HTTPClientResponseDelegate
that wraps a callback.
final class HTTPClientCopyingDelegate
HTTPClientCopyingDelegate
discards most parts of a HTTP response, but streams the body to the chunkHandler
provided on init(chunkHandler:)
. This is mostly useful for testing.
See also
protocol HTTPClientResponseDelegate
HTTPClientResponseDelegate
allows an implementation to receive notifications about request processing and to control how response parts are processed.class ResponseAccumulator
The default
HTTPClientResponseDelegate
.class FileDownloadDelegate
Handles a streaming download to a given file path, allowing headers and progress to be reported.
Citizens in AsyncHTTPClient
Typealiases
Type members
Instance members
func didFinishRequest(task: HTTPClient.Task<Void>
) throws func didReceiveBodyPart(task: HTTPClient.Task<Void>, ByteBuffer
) -> EventLoopFuture<Void>
Instance features
func didReceiveError(task: HTTPClient.Task<Response>, Error
) Default implementation of
didReceiveError(task:_:)
.func didReceiveHead(task: HTTPClient.Task<Response>, HTTPResponseHead
) -> EventLoopFuture<Void> Default implementation of
didReceiveHead(task:_:)
.func didSendRequest(task: HTTPClient.Task<Response>
) Default implementation of
didSendRequest(task:)
.func didSendRequestHead(task: HTTPClient.Task<Response>, HTTPRequestHead
) Default implementation of
didSendRequest(task:)
.func didSendRequestPart(task: HTTPClient.Task<Response>, IOData
) Default implementation of
didSendRequestPart(task:_:)
.