HBRouterMethods
public protocol HBRouterMethods
Undocumented
-
on(_:method:options:use:)
Default implementationAdd path for closure returning type conforming to ResponseFutureEncodable
Default Implementation
Add path for
HBRouteHandler
that returns anEventLoopFuture
specialized with a type conforming toHBResponseGenerator
Declaration
Swift
@discardableResult func on<Output>(_ path: String, method: HTTPMethod, options: HBRouterMethodOptions, use: @escaping (HBRequest) throws -> Output) -> Self where Output : HBResponseGenerator
-
Add path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult func on<Output>(_ path: String, method: HTTPMethod, options: HBRouterMethodOptions, use: @escaping (HBRequest) -> EventLoopFuture<Output>) -> Self where Output : HBResponseGenerator
-
add group
Declaration
Swift
func group(_ path: String) -> HBRouterGroup
-
get(_:options:use:)
Extension methodGET path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func get<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
put(_:options:use:)
Extension methodPUT path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func put<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
post(_:options:use:)
Extension methodPOST path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func post<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
head(_:options:use:)
Extension methodHEAD path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func head<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
delete(_:options:use:)
Extension methodDELETE path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func delete<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
patch(_:options:use:)
Extension methodPATCH path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func patch<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == _Output
-
get(_:options:use:)
Extension methodGET path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func get<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
put(_:options:use:)
Extension methodPUT path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func put<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
post(_:options:use:)
Extension methodPOST path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func post<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
head(_:options:use:)
Extension methodHEAD path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func head<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
delete(_:options:use:)
Extension methodDELETE path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func delete<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
patch(_:options:use:)
Extension methodPATCH path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func patch<Handler: HBRouteHandler, _Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: Handler.Type ) -> Self where Handler._Output == EventLoopFuture<_Output>
-
get(_:options:use:)
Extension methodGET path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func get<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
put(_:options:use:)
Extension methodPUT path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func put<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
post(_:options:use:)
Extension methodPOST path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func post<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
head(_:options:use:)
Extension methodHEAD path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func head<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
delete(_:options:use:)
Extension methodDELETE path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func delete<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
patch(_:options:use:)
Extension methodPATCH path for closure returning type conforming to HBResponseGenerator
Declaration
Swift
@discardableResult public func patch<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) throws -> Output ) -> Self
-
get(_:options:use:)
Extension methodGET path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func get<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
put(_:options:use:)
Extension methodPUT path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func put<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
delete(_:options:use:)
Extension methodPOST path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func delete<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
head(_:options:use:)
Extension methodHEAD path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func head<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
post(_:options:use:)
Extension methodDELETE path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func post<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
patch(_:options:use:)
Extension methodPATCH path for closure returning type conforming to ResponseFutureEncodable
Declaration
Swift
@discardableResult public func patch<Output: HBResponseGenerator>( _ path: String = "", options: HBRouterMethodOptions = [], use handler: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> Self
-
constructResponder(options:use:)
Extension methodUndocumented
Declaration
Swift
func constructResponder<Output: HBResponseGenerator>( options: HBRouterMethodOptions, use closure: @escaping (HBRequest) throws -> Output ) -> HBResponder
-
constructResponder(options:use:)
Extension methodUndocumented
Declaration
Swift
func constructResponder<Output: HBResponseGenerator>( options: HBRouterMethodOptions, use closure: @escaping (HBRequest) -> EventLoopFuture<Output> ) -> HBResponder