Last active
November 4, 2018 13:19
-
-
Save tongueroo/94f22f6c261c8999e4f4f776547e2ee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -H 'accept-encoding: gzip, deflate, br' localhost:8080/posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/posts" for 127.0.0.1 at 2018-11-04 13:17:23 +0000 | |
Processing by PostsController#index as */* | |
Rendering posts/index.html.erb within layouts/application | |
request.class ActionDispatch::Request | |
SCRIPT_NAME: | |
QUERY_STRING: | |
SERVER_PROTOCOL: HTTP/1.1 | |
SERVER_SOFTWARE: puma 3.12.0 Llamas in Pajamas | |
GATEWAY_INTERFACE: CGI/1.2 | |
REQUEST_METHOD: GET | |
REQUEST_PATH: /posts | |
REQUEST_URI: /posts | |
HTTP_VERSION: HTTP/1.1 | |
HTTP_HOST: localhost:8080 | |
HTTP_USER_AGENT: curl/7.53.1 | |
HTTP_ACCEPT: */* | |
HTTP_ACCEPT_ENCODING: gzip, deflate, br | |
SERVER_NAME: localhost | |
SERVER_PORT: 8080 | |
PATH_INFO: /posts | |
REMOTE_ADDR: 127.0.0.1 | |
rack.url_scheme: http | |
action_dispatch.secret_key_base: a8e9f9e41cf9f4ace56abc1f84a22fd1 | |
action_dispatch.http_auth_salt: http authentication | |
action_dispatch.signed_cookie_salt: signed cookie | |
action_dispatch.encrypted_cookie_salt: encrypted cookie | |
action_dispatch.encrypted_signed_cookie_salt: signed encrypted cookie | |
action_dispatch.authenticated_encrypted_cookie_salt: authenticated encrypted cookie | |
ROUTES_47353250709780_SCRIPT_NAME: | |
ORIGINAL_FULLPATH: /posts | |
ORIGINAL_SCRIPT_NAME: | |
action_dispatch.request_id: 8761c15a-86f5-4eec-aed9-512ff7455db3 | |
rack.request.query_string: | |
Post Load (0.2ms) SELECT "posts".* FROM "posts" | |
↳ app/views/posts/index.html.erb:15 | |
Rendered posts/index.html.erb within layouts/application (1.5ms) | |
Completed 200 OK in 19ms (Views: 15.5ms | ActiveRecord: 0.2ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PostsHelper | |
def foobar | |
puts "request.class #{request.class}" # ActionDispatch::Request | |
request.headers.each do |k,v| | |
if v.is_a?(String) | |
puts "#{k}: #{v}" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment