Skip to content

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

Instance MethodRoutingKit

require(_:)

Grabs the named parameter from the parameter bag. If the parameter does not exist, Abort(.internalServerError) is thrown. If the parameter value cannot be converted to String, Abort(.unprocessableContent) is thrown.
func require(_ name: String) throws -> String

Parameters

name

The name of the parameter.