WSO2 ESB Call a REST API with text/plain content
<p>I need to call a REST API with plain text in body content.</p>

<p>A CURL command</p>

<p><code>curl -X POST http://mydomain.test.corp/token -H "Content-Type: text/plain" -d "grant_type=password&amp;username=testUName&amp;password=123123"</code></p>

<p>is giving my desired output. How can I build this as a proxy service. I was thinking of payload mediator but it only accepts media type xml/json. </p>

<p>I'm unable save <code>grant_type=password&amp;username=testUName&amp;password=123123</code> in the proxy service xml because of the ampersand sign I think.</p>

<p>Any help is very much appreciated.</p>

<p>Thanks.</p>