didReceiveBodyPart(task:_:)
Called when part of a response body is received. Could be called zero or more times. You must return an EventLoopFuture<Void>
that you complete when you have finished processing the body part. You can create an already succeeded future by calling task.eventLoop.makeSucceededFuture(())
.
func didReceiveBodyPart(task: HTTPClient.Task<Response>, _ buffer: ByteBuffer) -> EventLoopFuture<Void>
Parameters
Returns
EventLoopFuture
that will be used for backpressure.
This function will not be called until the future returned by didReceiveHead(task:_:)
has completed.
This function will not be called for subsequent body parts until the previous future returned by a call to this function completes.