diff --git a/Sources/AsyncHTTPClient/HTTPHandler.swift b/Sources/AsyncHTTPClient/HTTPHandler.swift index 3de8aaa68..f6b10d075 100644 --- a/Sources/AsyncHTTPClient/HTTPHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPHandler.swift @@ -179,6 +179,20 @@ extension HTTPClient { public var headers: HTTPHeaders /// Response body. public var body: ByteBuffer? + + /// Create HTTP `Response`. + /// + /// - parameters: + /// - host: Remote host of the request. + /// - status: Response HTTP status. + /// - headers: Reponse HTTP headers. + /// - body: Response body. + public init(host: String, status: HTTPResponseStatus, headers: HTTPHeaders, body: ByteBuffer?) { + self.host = host + self.status = status + self.headers = headers + self.body = body + } } }