I'm trying to download the HTML content from a URL without success.
Here is the URL:
http://example.com/some_string[value]
When use RestClient I get this error:
URI::InvalidURIError: bad URI(is not URI?)
I got some help from the Ruby on Rails IRC. The Idea is to escape the end of the URL.
$ "http://example.com/" + CGI::escape("some_string[value]")
=> "http://example.com/some_string%5Bvalue%5D"
The generated URL does not work, I'm getting a 404. It works in the browsers though.
Anyone knows how to get it to work?