Class: HttpLog::HttpRequest
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- HttpLog::HttpRequest
- Defined in:
- lib/http_log/http_request.rb
Instance Method Summary collapse
Instance Method Details
#accepts ⇒ Object
3 4 5 |
# File 'lib/http_log/http_request.rb', line 3 def accepts Array.wrap(super).map(&:to_s) end |
#header_hash ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/http_log/http_request.rb', line 7 def header_hash header_keys = env.keys.select {|k| k =~ /HTTP_\w+/ } hash = {} header_keys.each do |key| hash[key] = env[key] end hash end |
#params ⇒ Object
26 27 28 |
# File 'lib/http_log/http_request.rb', line 26 def params super.merge(env['action_dispatch.request.request_parameters'] || {}) end |
#raw_post ⇒ Object
20 21 22 23 24 |
# File 'lib/http_log/http_request.rb', line 20 def raw_post content = env['rack.input'].read env['rack.input'].rewind content end |