Skip to content

Instantly share code, notes, and snippets.

@jhowarth
Created April 15, 2011 23:15
Show Gist options
  • Save jhowarth/922635 to your computer and use it in GitHub Desktop.
Save jhowarth/922635 to your computer and use it in GitHub Desktop.
How to open a URL that contains an underscore in the subdomain
require 'addressable/uri'
require 'net/http'
@uri = Addressable::URI.parse("http://sub_domain.host.com")
@response = Net::HTTP.get_response(@uri)
puts @response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment