Skip to content

Request

struct Athena::Routing::Arguments::Resolvers::Request
inherits Struct

Handles resolving a value for action arguments typed as HTTP::Request.

@[ARTA::Get("/")]
def get_request_path(request : HTTP::Request) : String
  request.path
end

Included modules

Athena::Routing::Arguments::Resolvers::ArgumentValueResolverInterface

Class methods

.new

Methods

#resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata)

Returns a value resolved from the provided request and argument.

#supports?(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) : Bool

Returns true if self is able to resolve a value from the provided request and argument.