I am trying to load HTML content from a URL without success.
Here is the url:
http:
When using RestClient, I get this error:
URI::InvalidURIError: bad URI(is not URI?)
I got some help from IRI Ruby on Rails. The idea is to avoid the end of the url.
$ "http://example.com/" + CGI::escape("some_string[value]")
=> "http://example.com/some_string%5Bvalue%5D"
The generated url is not working, I get 404. However, it works in browsers.
Does anyone know how to make it work?
source
share