I'm trying to call a rest web service which accept JSON payload from WSO2 store jaggery app. I used WSRequest and it is allowed to send only xml payload. Is there any way which we can call a web service with a JSON payload from jaggery.
Asked
Active
Viewed 75 times
0
-
This can be done using XMLHttpRequest. `var url = '
'; var xhr = new XMLHttpRequest(); xhr.open("POST", url); xhr.setRequestHeader("Content-Type" , "text/plain"); xhr.send(payload); var response = xhr.responseText;` – Chintha Apr 09 '18 at 08:55