on ‎2017 Feb 24 1:14 PM
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
Request clarification before answering.
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.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
https://uacp.hana.ondemand.com/http.svc/rc/PRODUCTION/93810d568bee49c6b3d7b5065a30b0ff/1/en-US/frame...
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks Sriprasad Shivaram Bhat, it helped me a lot, as I Already marked the Morten's answer as a correctly, I unfortunately cannot mark both as a correct. But you helped a Lot!
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 com.sap.gateway.ip.core.customdev.util.Message;
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;
}

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.