我有一個API中心的應用程序(/ API/V1 /用戶),它只是用JSON格式返回REST風格的所有用戶。Rails的HTTParty獲取超時::錯誤
我的問題是,如果我叫控制器上的這條路線,它返回「超時::錯誤」 問題是什麼?
class BaseController < ApplicationController
def index
return HTTParty.get('http://localhost:3000/api/v1/users').body
end
end
更新
- users_controller.rb(/ API/V1 /用戶)
- application_controller.rb
https://gist.github.com/4359591
日誌
你可以顯示控制器負責返回JSON的方法嗎? –
@JiříPospíšil用更多的信息更新了我的問題 –
你能分享日誌嗎? –