Parts of a ruby URI:
fragment The part of URI after ’#’ sign ('#poignantcontent')
host Server host name ('whytheluckystiff.net')
path Path on server ('/incidents.html')
port Server port ('80')
query Query string ( '?chunkybacon=true' )
scheme Protocol scheme ('http','ftp','mailto' and so on)
userinfo User name and password ('sdmitry:bla')
Using with net/http:
Net::HTTP.start(uri.host, uri.port) do |http|
http.get(uri.path, header)
endcheat sheets.
$ cheat uri