Endpoint
public protocol Endpoint
A protocol most Corvus components in a hierarchy conform to, so that they may be treated as the same type interchangeably.
-
contentDefault implementationThe content of an
Endpoint, used for components which can harbor other components, e.g.Group.Default Implementation
An empty default implementation for
contentfor components that do not have it.Declaration
Swift
var content: Endpoint { get } -
register(to:Default implementation) A method needed to implement registration of an endpoint to the
Routerprovided by Vapor, this handles the logic of making certain operations accessible on certain route paths.Default Implementation
A default implementation of
.register()for components that do not need special behaviour.Declaration
Swift
func register(to routes: RoutesBuilder)Parameters
routesThe
RoutesBuildercontaining HTTP route information up to this point.
Endpoint Protocol Reference