How to remove header "Content-Type=application/json" of the GET aggregation

Hey guys,

How can we remove the header “Content-Type=application/json” from an API call, as DataPower does not accept this parameter, is it possible to restrict the sending of this parameter?

thank you in advance for your help.

Hi @reinajss I assume you are using Webservice connector. If it is so you can create a Web Services Before Operation Rule and update the endpoint so that the content-type is not passed

import sailpoint.connector.webservices.WebServicesClient;
import sailpoint.tools.Util;

Map newHeader = (Map) requestEndPoint.getHeader(); // Will  give you the current header

// Your logic to remove the header

requestEndPoint.setHeader(newHeader);
Map headerMap = (Map) requestEndPoint.getHeader();
return requestEndPoint;
1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.