Delphi TRestClient send Body as "data-raw"

229 Views Asked by At

How to add body parameter to TRestClient like in Postman? If body data is defined like below as application/x-www-form-urlencoded it would be wrong:

curl -L -X POST 'https://ms2.medapp.ch/rest/lg1/v1/call-medapp' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d '..datastring..'

How to define TRestClient and its body parameter so that it looks like the following example from Postman?

curl -L -X POST 'https://ms2.medapp.ch/rest/lg1/v1/call-medapp' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '..datastring..'

The problem is in the executeion of TRestClient: the parameter is interpreted wrongly. Which option do I have to set to send the body as raw?

0

There are 0 best solutions below