Skip to main content

I’m trying to invoke a rest endpoint and I want to pass 2 HTTP: headers with dynamic values. So I tried generating the values for the headers in PLSQL and pass on to http_req_headers_ parameter in Plsql_Rest_Sender_API.Call_Rest_EndPoint_Json_Sync. However I can’t get that working for more than one dynamic HTTP header. 

Of course I can define multiple headers in the routing address but I have two with dynamic values. 

What is the separator I should use here? 

This is how I have added one dynamic HTTP header to the request, but the header ‘Idempotency-Key’ defined as static in the address should ne handled dynamically in PLSQL but I can’t find a way of concatenating ‘Authorization’ header and ‘Idempotency-Key’ header. 

 



I tried separating them with , ; but that does not seem to work.

Hi @wia_amilal 

 

I gave a try in 24R1 and was able to add headers in both routing address and in the PLSQL

 

Routing Address:

 

PLSQL

 

Receiving API got both the headers set from address and method call.

 

In the plsql call, headers need to be separated as 'header1:value1, header2:value2' and in the routing address, it should be

additionalHeader1=header1

additionalHeader2=header2

 

Note that the content type and host will be set automatically so you don’t need to add them in the routing address.

 

Give a try and let know if it works!

Damith


Hi Damith,

Thanks for the answer.
I tried comma as the separator, but it did not work for the external endpoint I was using. It failed with a HTTP 400 bad request.

 

Best regards,

Amila


Hi Damith,

Thanks for the answer.
I tried comma as the separator, but it did not work for the external endpoint I was using. It failed with a HTTP 400 bad request.

 

Best regards,

Amila

try to send your request to Postman mock server and see if you get the intended headers. Then compare it with a successful request and see if you have all the headers and payload as the API would want it to be ;)


Reply