兄弟朋友们关注以下代码:
url = URI.parse(参数)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = false
http.read_timeout = 5000
headers = {
'Content-Type' => 'application/json'
}
res = http.start { |con| con.post(url.path.blank? ? "/" : url.path, c, headers) }
res.body
每次执行的结果总是 504 错误 小弟不明白的是: http.use_ssl = false http.read_timeout = 5000 还希望高手指点一二 谢谢!