0

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.

Chintha
  • 95
  • 9
  • 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

1 Answers1

0

You can also use the jaggery post[1] as well.

[1] - http://jaggeryjs.org/documentation.jag?api=post