ruby - 使用fariday 时, 加上timeout

访问量: 147

参考: https://github.com/lostisland/faraday/issues/417
conn = Faraday.new("https://api.example.com", request: {
  open_timeout: 2,   # opening a connection
  timeout: 5         # waiting for response
})

conn.get(...)

订阅/RSS Feed

Subscribe

分类/category