4

我正在使用 Typhoeus gem 将 http 请求发送到 API。它在我的系统上工作。但是,从 TESTING 服务器发送相同的内容时,它没有给出所需的响应。我想知道可能是什么问题?请帮我。

我的代码:

data = {"auth_token"=>"abcd" ,"employee" => {"method" => "add_employee"}}
header =  { "Content-Type" => "application/json","Accept"=>"application/json"}
request = Typhoeus::Request.post("www.example.com",:body=> data.to_json,:headers => header)
4

0 回答 0