Skip to content

Instantly share code, notes, and snippets.

@zzak
Created November 18, 2013 02:30
Show Gist options
  • Save zzak/7521490 to your computer and use it in GitHub Desktop.
Save zzak/7521490 to your computer and use it in GitHub Desktop.
Net::HTTP.start(uri.host, uri.port) do |http|
req = Net::HTTP::Get.new uri
resp = http.request req # a Net::HTTPResponse object
code = resp.code
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment