简体   繁体   English

使用XML发送HTTP.post()吗?

[英]Send HTTP.post() with XML?

Is there any way to use HTTP.post(url, body, headers) of ionic-native with a XML body? 有什么方法可以将ionic-native的HTTP.post(url, body, headers)与XML正文一起使用?

post() there it says it needs an object (JSON) but my webservice needs an XML request. post()那里说它需要一个对象(JSON),但我的Web服务需要一个XML请求。

Is there maybe something like an xml object? 是否可能有类似xml对象的内容?

Did you try to set content-type to text/xml like in the following example? 您是否尝试像下面的示例一样将content-type设置为text / xml

let headers = new Headers();
headers.append('Content-Type', 'text/xml');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM