开发者

HTTParty and text/xml

I'm trying to make a POST request using HTTParty, in which I need the content-type to be text/xml. How can I make that happen? Right now the API I'm calling is 开发者_如何学Pythoncomplaining I'm not sending any xml. If I call it using curl I get the same error, unless I specify content-type to text/xml.


HTTParty.post url, :body => xml, :headers => {'Content-type' => 'text/xml'}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜