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