cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

406 ! SAP CPI sets 'Accept' header automatically to 'application/xml' while using Odata V4 adapter !

sam_anish1
Participant
2,337

Hi Team,

I have an Odata4 API on BTP, exposing data in application/json format. While querying this API using Odata4 adapter from CPI, CPI assumes the 'Accept' header value as 'application/xml' as shown in below screenshots !!

screenshot of what we pass in the Accept header

Screenshot of CPI assuming the 'Accept' header as 'application/xml'


This header change results in a 406 error code response from the API !

What can be done here to resolve the issue ?!

Accepted Solutions (0)

Answers (3)

Answers (3)

raskolnico
Explorer
0 Kudos

Hello sam..anish i am facing the same problem. did you manage to resolve it ?

PriyankaChak
SAP Champion
SAP Champion
0 Kudos

Hi Sam,

In OData receiver adapter, can you please set the below parameter and try again?

Request Headers -> Accept

Regards,

Priyanka

sam_anish1
Participant

Hi Priyanka,

I've maintained that as well but no luck !

VijayKonam
Active Contributor
0 Kudos

Add the "Accept" header with the needed value before the API call in a content modifier step!

sam_anish1
Participant
0 Kudos

Its already in place as shown in first screenshot.