Skip to content

Instantly share code, notes, and snippets.

@sujithrs
Created February 28, 2014 14:17
Show Gist options
  • 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