@@ -230,7 +230,7 @@ internal class ResponseAccumulator: HTTPClientResponseDelegate {
230
230
return task. eventLoop. makeSucceededFuture ( ( ) )
231
231
}
232
232
233
- func didReceivePart ( task: HTTPClient . Task < Response > , _ part: ByteBuffer ) -> EventLoopFuture < Void > {
233
+ func didReceiveBodyPart ( task: HTTPClient . Task < Response > , _ part: ByteBuffer ) -> EventLoopFuture < Void > {
234
234
switch self . state {
235
235
case . idle:
236
236
preconditionFailure ( " no head received before body " )
@@ -319,7 +319,7 @@ public protocol HTTPClientResponseDelegate: AnyObject {
319
319
/// - task: Current request context.
320
320
/// - buffer: Received body `Part`.
321
321
/// - returns: `EventLoopFuture` that will be used for backpressure.
322
- func didReceivePart ( task: HTTPClient . Task < Response > , _ buffer: ByteBuffer ) -> EventLoopFuture < Void >
322
+ func didReceiveBodyPart ( task: HTTPClient . Task < Response > , _ buffer: ByteBuffer ) -> EventLoopFuture < Void >
323
323
324
324
/// Called when error was thrown during request execution. Will be called zero or one time only. Request processing will be stopped after that.
325
325
///
@@ -345,7 +345,7 @@ extension HTTPClientResponseDelegate {
345
345
346
346
public func didReceiveHead( task: HTTPClient . Task < Response > , _: HTTPResponseHead ) -> EventLoopFuture < Void > { return task. eventLoop. makeSucceededFuture ( ( ) ) }
347
347
348
- public func didReceivePart ( task: HTTPClient . Task < Response > , _: ByteBuffer ) -> EventLoopFuture < Void > { return task. eventLoop. makeSucceededFuture ( ( ) ) }
348
+ public func didReceiveBodyPart ( task: HTTPClient . Task < Response > , _: ByteBuffer ) -> EventLoopFuture < Void > { return task. eventLoop. makeSucceededFuture ( ( ) ) }
349
349
350
350
public func didReceiveError( task: HTTPClient . Task < Response > , _: Error ) { }
351
351
}
@@ -550,7 +550,7 @@ internal class TaskHandler<T: HTTPClientResponseDelegate>: ChannelInboundHandler
550
550
default :
551
551
self . state = . body
552
552
self . mayRead = false
553
- self . delegate. didReceivePart ( task: self . task, body) . whenComplete { result in
553
+ self . delegate. didReceiveBodyPart ( task: self . task, body) . whenComplete { result in
554
554
self . handleBackpressureResult ( context: context, result: result)
555
555
}
556
556
}
0 commit comments