Last active
October 13, 2015 20:38
-
-
Save miguelbermudez/4252682 to your computer and use it in GitHub Desktop.
Quick Print Parameters from a url
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rack' | |
require "awesome_print" | |
uri = ARGV[0] | |
env = Rack::MockRequest.env_for(uri) | |
req = Rack::Request.new(env) | |
puts "---\n" | |
ap "URL: #{uri}" | |
ap req.params | |
puts "---\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment