我正在用 Ruby-on-Rails 编码
我想向另一个服务发送一个 http 请求,但不等待响应。
伪代码:
def notification
require 'net/http'
...
# send net/http request
Net::HTTP.post_form(url, params)
render :text => "Rendered quickly as did not wait for response from POST"
end
有什么方法可以发送 POST 请求而不是等待响应而只是快速呈现页面?