Skip to Content
0
P S
Mar 23, 2019 at 06:31 PM

Passing form-data to external API through script task in SAP Cloud Platform workflow

515 Views

Hello All,

I have a requirement to do a HTTP POST request to an external API for fetching the token. This API is accepting parameters only as form-data(see attached image). If i try to convert it to JSON or run in raw it gives status 404.

I need to trigger this API in the SAP cloud workflow using a service task. What should be the code to pass this form data in the workflow script task context? I tried possible combination like passing it as JSON, sending it as x-www-form-urlcoded format but the API is returning bad request and not able to recognize it as form-data.

Any pointers in this regard will be appreciated.

Attachments

capture.png (19.9 kB)