class Athena::Routing::RequestContext
inherits Reference
#
Represents data from a request in an agnostic manner, primarily used to augment URL matching and generation with additional context.
Constructors#
.from_uri(uri : String, host : String = "localhost", scheme : String = "http", http_port : Int32 = 80, https_port : Int32 = 443) : self
#
Creates a new instance of self from the provided uri. The host, scheme, http_port, and https_port optionally act as fallbacks if they are not contained within the uri.
.from_uri(uri : URI, host : String = "localhost", scheme : String = "http", http_port : Int32 = 80, https_port : Int32 = 443) : self
#
Creates a new instance of self from the provided uri. The host, scheme, http_port, and https_port optionally act as fallbacks if they are not contained within the uri.
.new(base_url : String = "", method : String = "GET", host : String = "localhost", scheme : String = "http", http_port : Int32 = 80, https_port : Int32 = 443, path : String = "/", query_string : String = "")
#
Methods#
#apply(request : ART::Request) : self
#
Updates the properties within self
based on the provided request.
#base_url : String
#
Represents the path of the URL before #path
.
E.g. a path that should be prefixed to all other #path
s.
#parameters : Hash(String, String | ::Nil)
#
Returns the global parameters that should be used as part of the URL generation logic.