class Athena::Framework::RequestStore
inherits Reference
#
Stores the current ATH::Request
object.
Can be injected to access the request from a non controller context.
require "athena"
@[ADI::Register(public: true)]
class ExampleController < ATH::Controller
def initialize(@request_store : ATH::RequestStore); end
get "/" do
@request_store.method
end
end
ATH.run
# GET / # => GET