`
open2ye
  • 浏览: 99480 次
  • 性别: Icon_minigender_1
  • 来自: 温州
社区版块
存档分类
最新评论

Ruby Http Client

    博客分类:
  • Ruby
阅读更多
ruby 代码
 
  1. require 'net/http'     
  2. Net::HTTP.start('open2ye.iteye.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   
分享到:
评论
2 楼 jerry 2008-08-15  
really?
1 楼 RobinWu 2007-04-12  
最好把POST操作的也发上来

相关推荐

Global site tag (gtag.js) - Google Analytics