Instance Methodasync-http-client 1.25.2AsyncHTTPClient
didReceiveHead(task:_:)
HTTPHandler.swift:524func didReceiveHead(task: HTTPClient.Task<Response>, _ head: HTTPResponseHead) -> EventLoopFuture<Void>
func didReceiveHead(task: HTTPClient.Task<Response>, _ head: HTTPResponseHead) -> EventLoopFuture<Void>
s15AsyncHTTPClient19ResponseAccumulatorC14didReceiveHead4task_7NIOCore15EventLoopFutureCyytGAA0B0C4TaskCy_AK0C0VG_8NIOHTTP1012HTTPResponseG0VtF
What are these?914IE
import AsyncHTTPClient
This package provides simple HTTP Client library built on top of SwiftNIO.
final class ResponseAccumulator
The default HTTPClientResponseDelegate
.
class HTTPClient
HTTPClient class provides API for request execution.
final class Task<Response>
Response execution context.
typealias Response = HTTPClient.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 ()
.
convenience init(request: HTTPClient.Request)
init(request: HTTPClient.Request, maxBodySize: Int)
let maxBodySize: Int
Maximum size in bytes of the HTTP response body that ResponseAccumulator
will accept until it will abort the request and throw an ResponseTooBigError
.
func didFinishRequest(task: HTTPClient.Task<Response>) throws -> Response
func didReceiveBodyPart(task: HTTPClient.Task<Response>, _ part: ByteBuffer) -> EventLoopFuture<Void>
func didReceiveError(task: HTTPClient.Task<Response>, _ error: Error)
struct ResponseTooBigError