Instance Method
require(_:as:)
Grabs the named parameter from the parameter bag, casting it to a
LosslessStringConvertible type. If the parameter does not exist, Abort(.internalServerError) is thrown. If the parameter value cannot be converted to the required type, Abort(.unprocessableEntity) is thrown.func require<T>(_ name: String, as type: T.Type = T.self) throws -> T where T : LosslessStringConvertible
Parameters
nameThe name of the parameter.
typeThe required parameter value type.