@@ -241,7 +241,7 @@ extension HTTPClient {
241
241
}
242
242
}
243
243
244
- internal class ResponseAccumulator : HTTPClientResponseDelegate {
244
+ public class ResponseAccumulator : HTTPClientResponseDelegate {
245
245
public typealias Response = HTTPClient . Response
246
246
247
247
enum State {
@@ -255,11 +255,11 @@ internal class ResponseAccumulator: HTTPClientResponseDelegate {
255
255
var state = State . idle
256
256
let request : HTTPClient . Request
257
257
258
- init ( request: HTTPClient . Request ) {
258
+ public init ( request: HTTPClient . Request ) {
259
259
self . request = request
260
260
}
261
261
262
- func didReceiveHead( task: HTTPClient . Task < Response > , _ head: HTTPResponseHead ) -> EventLoopFuture < Void > {
262
+ public func didReceiveHead( task: HTTPClient . Task < Response > , _ head: HTTPResponseHead ) -> EventLoopFuture < Void > {
263
263
switch self . state {
264
264
case . idle:
265
265
self . state = . head( head)
@@ -275,7 +275,7 @@ internal class ResponseAccumulator: HTTPClientResponseDelegate {
275
275
return task. eventLoop. makeSucceededFuture ( ( ) )
276
276
}
277
277
278
- func didReceiveBodyPart( task: HTTPClient . Task < Response > , _ part: ByteBuffer ) -> EventLoopFuture < Void > {
278
+ public func didReceiveBodyPart( task: HTTPClient . Task < Response > , _ part: ByteBuffer ) -> EventLoopFuture < Void > {
279
279
switch self . state {
280
280
case . idle:
281
281
preconditionFailure ( " no head received before body " )
@@ -293,11 +293,11 @@ internal class ResponseAccumulator: HTTPClientResponseDelegate {
293
293
return task. eventLoop. makeSucceededFuture ( ( ) )
294
294
}
295
295
296
- func didReceiveError( task: HTTPClient . Task < Response > , _ error: Error ) {
296
+ public func didReceiveError( task: HTTPClient . Task < Response > , _ error: Error ) {
297
297
self . state = . error( error)
298
298
}
299
299
300
- func didFinishRequest( task: HTTPClient . Task < Response > ) throws -> Response {
300
+ public func didFinishRequest( task: HTTPClient . Task < Response > ) throws -> Response {
301
301
switch self . state {
302
302
case . idle:
303
303
preconditionFailure ( " no head received before end " )
0 commit comments