Skip to content

Extended Structure

Parameters

extension Parameters

Topics

Instance Methods

  • 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(.unprocessableEntity) is thrown.
  • 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.