我想将 POST/GET 从 Rails 应用程序发送到特定地址。但是,当我运行应用程序时,我收到错误消息:“无法建立连接,因为目标机器主动拒绝了它。-connect(2)”下面是我的代码:
def show
@uri = URI('example.com/getuser?user=bob&email=bob84@gmail.com')
@profile = Net::HTTP.get(@uri)
puts @profile
end
我想将 POST/GET 从 Rails 应用程序发送到特定地址。但是,当我运行应用程序时,我收到错误消息:“无法建立连接,因为目标机器主动拒绝了它。-connect(2)”下面是我的代码:
def show
@uri = URI('example.com/getuser?user=bob&email=bob84@gmail.com')
@profile = Net::HTTP.get(@uri)
puts @profile
end