Question

IFS is not passing aditional headers

  • 4 June 2020
  • 8 replies
  • 392 views

Userlevel 3
Badge +8

Hi,

I’m trying to pass an aditional header key to a http call from IFS9.

If I use the below Routing Address, my additional header parameter will show in options in the response, but if I look at what headers IFS is actually sending it is not there.

I send the request to an http endpoint that i control and read the headers from there.

Here are the headers:
{"Accept":"text/html, image/gif, image/jpeg, */*; q=.2","Connection":"close","Content-Length":"43","Content-Type":"text/xml; charset=UTF-8","Host":"***.pythonanywhere.com","User-Agent":"Java1.8.0_60","X-Forwarded-For":"***.***.***.***","X-Real-Ip":"***.***.***.***"} 

 

I need to send an aditional key. Can anyone help explain how to do that?

 

 


8 replies

Userlevel 7
Badge +20

Hi @krestensb ,

 

Try to define additional header parameters in KEY=VALUE format.

Eg:

Content-Type=application/json

Userlevel 3
Badge +8

I tried this, but it doesn’t go trough.

Badge +2

hi did you solve this? same issue on IFS Cloud. I also tried ssl:Content-Type

Userlevel 7
Badge +20

hi did you solve this? same issue on IFS Cloud. I also tried ssl:Content-Type

 

Hi @pieronegri 

only the SSL related parameters needs to be prefixed with ssl:

They are not added to the transport, but used to established the SSL communication.

For generic HTTP headers, valid format is  PARAMETER=VALUE as mentioned above

 

Routing Rules and Addresses - Technical Documentation For IFS Cloud

 

Hope it helps!

Damith

Badge +2

hello and thanks for your reply. I tried PARAMETER=VALUE,  as advised already in this thread unfortunately it does not work much like the feedback already given by @krestensb .  Content-Type header is blank

Userlevel 7
Badge +20

hello and thanks for your reply. I tried PARAMETER=VALUE,  as advised already in this thread unfortunately it does not work much like the feedback already given by @krestensb .  Content-Type header is blank

Hi @pieronegri 

which IFS Cloud version are you in?

Badge +2

hello and thanks for your reply. I tried PARAMETER=VALUE,  as advised already in this thread unfortunately it does not work much like the feedback already given by @krestensb .  Content-Type header is blank

Hi @pieronegri 

which IFS Cloud version are you in?

Hi @dsj 

23.2.something :-)

Userlevel 7
Badge +20

Hi @pieronegri 

 

I did a small test in a 23.2.3 environment and seems the custom headers are passing as it should.

Here’s what I did:

Created a routing address of HTTP and added Content-Type and a custom header.  I’m sending the request to a postman mock server so I could check the content.

 

Created a routing rule

Created a request using Plsql_Rest_Sender_API.Call_Rest_EndPoint

 

request received by the mock server contained the headers I added from the routing address

 

Do you have an example of your setup to check where it might have gone wrong?

 

Cheers!

Damith

Reply