didReceiveHead(task:_:)

Called when response head is received. Will be called once. 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(()).

HTTPHandler.swift:679
func didReceiveHead(task: HTTPClient.Task<Response>, _ head: HTTPResponseHead) -> EventLoopFuture<Void>

Parameters

task

Current request context.

head

Received reposonse head.

Returns

EventLoopFuture that will be used for backpressure.