简体   繁体   中英

Send HTTP.post() with XML?

Is there any way to use HTTP.post(url, body, headers) of ionic-native with a XML body?

post() there it says it needs an object (JSON) but my webservice needs an XML request.

Is there maybe something like an xml object?

Did you try to set content-type to text/xml like in the following example?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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