Sending just a plain text with application/json inside WSO2 REST API

31 Views Asked by At

Here is the curl for a request i am trying to replicate inside wso2 micro-integrator REST API. I am unable to send it without the curly brackets and key : value format. Any clues how to do this in WSO2? ContentType: text/plain doesn't work for the backend server.

curl --location 'http://12.34.56.78/generateotp' --header 'Content-Type: application/json' --header 'X-Auth: C1185D8E3281545AE05502505A|QlhHeWtvYmtFSm84VGVLbUFYTEExOXdyNjE4WGhwYkthVnlTTzBaVnMvQ0FWNFkyMmFMTkhiU0xGVmhGS0pxenNGK2YrVHN0ZVlxYnb29OVGM1U0UyK2VRM3FjamRxMTdWTWpoaXZoWlBVVUdzblZEWmVpRDlMVEhjV2s=' --data '923331234567'

Tried sending it in the form of application/x-www-form-url-encoded form as well, but it too didn't work inside WSO2 REST API code. Works inside postman though.

0

There are 0 best solutions below