cheat sheets.

$ cheat uri
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)
  end
Version 1, updated 1048 days ago.
. o 0 ( edit | history )
( add new | see all )