struct Athena::Routing::Arguments::Resolvers::Request

Overview

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

Defined in:

arguments/resolvers/request_value_resolver.cr

Constructors

Instance Method Summary

Instance methods inherited from module Athena::Routing::Arguments::Resolvers::ArgumentValueResolverInterface

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

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def initialize #

[View source]
def resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) #

Returns a value resolved from the provided request and argument.


[View source]
def 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.


[View source]