Protocol
ResponseEncodable
Can convert
self to a Response.protocol ResponseEncodable : SendableMetatype
Overview
Types that conform to this protocol can be returned in route closures.
Topics
Instance Methods
func encodeResponse(for: Request) -> EventLoopFuture<Response>Encodes an instance ofSelfto aResponse.func encodeResponse(status: HTTPStatus, headers: HTTPHeaders, for: Request) -> EventLoopFuture<Response>Asynchronously encodesSelfinto aResponse, setting the supplied status and headers.
Relationships
Inherits From
Swift.SendableMetatype
Inherited By
Conforming Types
AnyResponseArrayBoolClientResponseDictionaryDoubleEventLoopFutureFloatHTTPResponseStatusIntInt16Int32Int64Int8ResponseStaticStringStringUIntUInt16UInt32UInt64UInt8View