Skip to Content
author's profile photo Former Member
Former Member

SAP HCI - HTTP Adapter with Header Parameter

Hello Experts,

We're trying to consume a Rest API via HTTP Receiver Adapter but, the services has the below two parameters:

- ACCEPT = application/xml

- X-CUSTOM-PARAM = Static GUID provided by the customer

How can we set these parameters in the HTTP Receiver HCI Adapter?

Thank You

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Feb 24, 2017 at 01:31 PM

    Hi Bruno

    The Content Modifier step, found in the Message Transformers category of the palette, lets you set headers directly. If the receiver adapter supports headers (which the HTTP adapter does, of course), the headers will be delivered to the recipent along with your request.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 24, 2017 at 01:45 PM

    Hello Bruno.

    Have Content Modifier before request reply[ Where you are calling HTTP adapter ] and set these two parameter as header.

    Below will give more details


    Sriprasad Shivaram Bhat

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 11, 2017 at 02:47 PM

    Hi Sriprasad Shivaram Bhat/ Bruno,

    I tried with content modifier for passing http header , type header and constant, as Sriprasad said, while selecting data type constant it gives me error, but while giving its type header it gives me Your browser does not support JavaScript or it is turned off, in header payload it will pass http headers names but not value it shows it's value null. so i write Groovy script for it and it works perfectly also in header payload it shos me value that i passed in groovy.

    please find groovy script below ,

    import java.util.HashMap;
    def Message processData(Message message) {
      // Get the OAuth token value from the properties
      def map = message.getProperties();
      // Set the OAuth authorization credentials
      message.setHeader("Authorization", "bearer ******);
    message.setHeader("Content-Type", "application/json");
    message.setHeader("tns_id", "***");
    message.setHeader("src_sys_id", "***");
    message.setHeader("src_ip_address", "***");
      return message;

    header.png (20.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.