2007-04-12

Ruby Http Client

ruby 代码
 
  1. require 'net/http'     
  2. Net::HTTP.start('open2ye.javaeye.com', 80) do |http|     
  3.   response = http.get('/')  
  4.    
  5.   #Do something with the response.     
  6.    
  7.   puts "Code: #{response.code}"      
  8.   puts "Message: #{response.message}"    
  9.   puts "Body:\n #{response.body}"    
  10. end   
评论
jerry 2008-08-15
really?
RobinWu 2007-04-12
最好把POST操作的也发上来
发表评论

您还没有登录,请登录后发表评论

open2ye
搜索本博客
我的相册
50090eed-4306-3c9c-a06c-c2627f008575-thumb
mary.JPG
共 27 张
最近加入圈子
存档
最新评论