SAP By Design CPI/HCI GUI - Content modifier block to set Content-Type

82 views Asked by At

I've got a simple scenario - getting some customer data out of SAP by design, and sending this data as a POST request to a third party endpoint.

The third party endpoint will only accept POST requests with a header of Content-Type of application/json

So I set up a Content Modifier block, as shown below:

Content modifier block

Content modifier block details

And then on the actual HTTP request I've put in the headers (the apikey header seems to work fine)

HTTP request block details

I've tried various things such as trying to set the content header of the message in groovy script

Groovy script method to change Content-Type message header

But all attempts have failed.

Just for completeness - the 3rd party API returns a 415 status code (Unsupported Media Type), and yes, if I use Postman with the correct Content-Type I get a 200 response.

Any pointers would be welcome

0

There are 0 answers