摘要: 1 require 'net/https' 2 require 'uri' 3 4 def post_api(api, args) 5 uri = URI.parse api 6 http = Net::HTTP.new(uri.host, uri.port) 7 http.use_ssl = true 8 req = Net::HTTP::Post.new(uri.request_uri) 9 req.set_form_data(args)10 response = http.request(req)11 JSON.lo... 阅读全文
posted @ 2013-12-17 13:54 芬奇 阅读(1725) 评论(0) 推荐(0) 编辑