我需要将带有x-www-form-urlencoded参数的POST请求发送到URL。我为此目的使用Typhoeus
gem。
@fetch = Typhoeus::Request.post("http://www.diyanet.gov.tr/turkish/namazvakti/vakithes_namazsonuc.asp", :params => {"ulk"=>"TURKIYE", "sehirler"=>"ADANA", "R1"=>"AYLIK"}, :headers=>{"Content-type"=>"application/x-www-form-urlencoded"})
但我没有达到我的预期......
这是下面的Postman(镀铬扩展)截图。正如您所看到的,我将所有内容设置为相同并且在Postman中正常运行。
你知道出了什么问题吗?
也欢迎不同的解决方案/宝石......
答案 0 :(得分:0)