Posted By

richardleonard on 11/30/-1


Tagged

get http textmate


Versions (?)

Who likes this?

26 people have marked this snippet as a favorite

daniel
talaris
codesmith
jonbaer
jpb
idiotkings
yuconner
fortuity
shazburg
Hollow
gbvb
vali29
copyleft
tkmr
Netzach
skammer
sergeizen
Bashelor
obsessivejosh
webstic
davidsi
madaemo
berkes
kgaddy
heckfy
kzelda


http get


 / Published in: Ruby
 

  1. require \'net/http\'
  2.  
  3. Net::HTTP.start(\'www.domain.com\', 80) {
  4. |http| print( http.get(\'/path/page.rhtml\').body )
  5. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: felipec on April 15, 2007

Even simpler ;)

require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'

Link

Posted By: plexus on June 19, 2007

require 'open-uri' print open('http://www.domain.com/path/page.rhtml').read

You need to login to post a comment.