Skip to content

struct Athena::HTTPKernel::Controller::ValueResolvers::RequestAttribute
inherits Struct #

Handles resolving a value that is stored in the request's AHTTP::Request#attributes. This includes any path/query parameters, custom values stored via an event listener, or extra defaults stored within the routing annotation.

@[ARTA::Get("/{id}")]
def get_id(id : Int32) : Int32
  id
end

Included modules

Athena::HTTPKernel::Controller::ValueResolvers::Interface

Constructors#

Methods#

#initialize#

View source

#resolve(request : AHTTP::Request, parameter : AHK::Controller::ParameterMetadata)#

Returns a value resolved from the provided request and parameter if possible, otherwise returns nil if no parameter could be resolved.

View source