Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

all(_:use:)

Adds the closure to the given path for all HTTP methods besides custom ones, so GET, POST, PUT, PATCH, DELETE, QUERY, HEAD, OPTIONS.
@discardableResult func all(_ path: PathComponent..., use closure: @Sendable @escaping (Request) async throws -> some ResponseEncodable) -> [Route]