Skip to content

Instantly share code, notes, and snippets.

@miguelbermudez
Last active October 13, 2015 20:38
Show Gist options
  • Save miguelbermudez/4252682 to your computer and use it in GitHub Desktop.
Save miguelbermudez/4252682 to your computer and use it in GitHub Desktop.
Quick Print Parameters from a url
#!/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