Class: Rack::Request
- Inherits:
-
Object
- Object
- Rack::Request
- Defined in:
- lib/rack/request.rb
Overview
Defined Under Namespace
Constant Summary collapse
- ALLOWED_SCHEMES =
%w(https http).freeze
- SCHEME_WHITELIST =
ALLOWED_SCHEMES
Constants included from Helpers
Helpers::DEFAULT_PORTS, Helpers::FORM_DATA_MEDIA_TYPES, Helpers::HTTP_X_FORWARDED_FOR, Helpers::HTTP_X_FORWARDED_HOST, Helpers::HTTP_X_FORWARDED_PORT, Helpers::HTTP_X_FORWARDED_PROTO, Helpers::HTTP_X_FORWARDED_SCHEME, Helpers::HTTP_X_FORWARDED_SSL, Helpers::PARSEABLE_DATA_MEDIA_TYPES
Class Attribute Summary collapse
-
.ip_filter ⇒ Object
Returns the value of attribute ip_filter.
Attributes included from Env
Instance Method Summary collapse
- #delete_param(k) ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #params ⇒ Object
- #update_param(k, v) ⇒ Object
Methods included from Helpers
#GET, #POST, #[], #[]=, #accept_encoding, #accept_language, #authority, #base_url, #body, #content_charset, #content_length, #content_type, #cookies, #delete?, #form_data?, #forwarded_authority, #forwarded_for, #forwarded_port, #fullpath, #get?, #head?, #host, #host_authority, #host_with_port, #hostname, #ip, #link?, #logger, #media_type, #media_type_params, #multithread?, #options?, #parseable_data?, #patch?, #path, #path_info, #path_info=, #port, #post?, #put?, #query_string, #referer, #request_method, #scheme, #script_name, #script_name=, #server_authority, #server_name, #server_port, #session, #session_options, #ssl?, #trace?, #trusted_proxy?, #unlink?, #url, #user_agent, #values_at, #xhr?
Methods included from Env
#add_header, #delete_header, #each_header, #fetch_header, #get_header, #has_header?, #initialize_copy, #set_header
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
26 27 28 29 |
# File 'lib/rack/request.rb', line 26 def initialize(env) @params = nil super(env) end |
Class Attribute Details
.ip_filter ⇒ Object
Returns the value of attribute ip_filter.
16 17 18 |
# File 'lib/rack/request.rb', line 16 def ip_filter @ip_filter end |
Instance Method Details
#delete_param(k) ⇒ Object
40 41 42 43 44 |
# File 'lib/rack/request.rb', line 40 def delete_param(k) v = super @params = nil v end |
#params ⇒ Object
31 32 33 |
# File 'lib/rack/request.rb', line 31 def params @params ||= super end |
#update_param(k, v) ⇒ Object
35 36 37 38 |
# File 'lib/rack/request.rb', line 35 def update_param(k, v) super @params = nil end |