def total
puts requeset.referrer
transactions = UTransaction.all
render json: amount(transactions)
end
Run Code Online (Sandbox Code Playgroud)
我在控制台中收到以下错误
Completed 500 Internal Server Error in 38ms
NameError (undefined local variable or method `requeset' for #<Api::V1::Admin::UTransactionsController:0x007f98d49539d0>)
Run Code Online (Sandbox Code Playgroud) 我在rails中有一个方法可以将发布请求发送到第三方API.代码类似于以下内容:
data = HTTParty.post("url",
:headers=> {'Content-Type' => 'application/json'},
:body=> { update => true, first_name => "name" }
)
Run Code Online (Sandbox Code Playgroud)
这样,在一分钟之后,该过程终止,并出现以下错误.
<Net::HTTPGatewayTimeOut 504 GATEWAY_TIMEOUT readbody=true>
Run Code Online (Sandbox Code Playgroud)