AppRouter

public class AppRouter

Undocumented

  • Handle inbound requests matching the specified method and path.

    Declaration

    Swift

    public func handle(_ method: HTTPMethod? = nil, path: String? = nil, action: @escaping RouteAction)

    Parameters

    method

    Match a particular HTTP method. nil matches any.

    path

    Match a particular URI path. nil matches any path.

    action

    The action to perform on the request.