didReceiveHead(task:_:)
Default implementation of didReceiveHead(task:_:)
.
func didReceiveHead(task: HTTPClient.Task<Response>, _: HTTPResponseHead) -> EventLoopFuture<Void>
By default, this does nothing.
Default implementation of didReceiveHead(task:_:)
.
func didReceiveHead(task: HTTPClient.Task<Response>, _: HTTPResponseHead) -> EventLoopFuture<Void>
s15AsyncHTTPClient0B16ResponseDelegatePAAE14didReceiveHead4task_7NIOCore15EventLoopFutureCyytGAA0B0C4TaskCy_0C0QzG_8NIOHTTP1012HTTPResponseG0VtF
What are these?61057
By default, this does nothing.
import AsyncHTTPClient
This package provides simple HTTP Client library built on top of SwiftNIO.
protocol HTTPClientResponseDelegate : AnyObject
HTTPClientResponseDelegate
allows an implementation to receive notifications about request processing and to control how response parts are processed.
func didReceiveHead(task: HTTPClient.Task<Response>, _ head: HTTPResponseHead) -> EventLoopFuture<Void>
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(())
.
class HTTPClient
HTTPClient class provides API for request execution.
final class Task<Response>
Response execution context.
associatedtype Response
struct HTTPResponseHead
A representation of the status line and header fields of a HTTP response.
final class EventLoopFuture<Value>
Holder for a result that will be provided later.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.
func didReceiveBodyPart(task: HTTPClient.Task<Response>, _: ByteBuffer) -> EventLoopFuture<Void>
Default implementation of didReceiveBodyPart(task:_:)
.
func didReceiveError(task: HTTPClient.Task<Response>, _: Error)
Default implementation of didReceiveError(task:_:)
.
func didSendRequest(task: HTTPClient.Task<Response>)
Default implementation of didSendRequest(task:)
.
func didSendRequestHead(task: HTTPClient.Task<Response>, _ head: HTTPRequestHead)
Default implementation of didSendRequest(task:)
.
func didSendRequestPart(task: HTTPClient.Task<Response>, _ part: IOData)
Default implementation of didSendRequestPart(task:_:)
.