Initializer
init(status:version:headers:body:)
Creates a new
Response.convenience init(status: HTTPResponseStatus = .ok, version: HTTPVersion = .init(major: 1, minor: 1), headers: HTTPHeaders = .init(), body: Response.Body = .empty)
Parameters
statusHTTPResponseStatusto use. This defaults toHTTPResponseStatus.okversionHTTPVersionof this response, should usually be (and defaults to) 1.1.headersHTTPHeadersto include with this response. Defaults to empty headers. The"Content-Length"and"Transfer-Encoding"headers will be set automatically.bodyBodyfor this response, defaults to an empty body. SeeResponse.Bodyfor more information.
Discussion
let res = Response(status: .ok)