Skip to content

Instantly share code, notes, and snippets.

@sujithrs
Created February 28, 2014 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sujithrs/9271818 to your computer and use it in GitHub Desktop.
Save sujithrs/9271818 to your computer and use it in GitHub Desktop.
# pryrc helper for http
def http_get(url)
Net::HTTP.get URI.parse(url)
end
def http_headers(url)
uri = URI.parse(url)
Net::HTTP.get_response(uri).each_header {|x| x}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment