Question
· Nov 14, 2023

Headers values and HTTP redirections problem

Hi community members!

Recently a customer ask me about a problem that detected when they were trying to send a post call to an external HTTP service, this service has changed and now it redirects to another URL, so they have setted to true the FollowRedirect parameter (setted to false for POST calls by default), what is the problem? They are sending a custom header in the post call and after the redirection this value is deleted.

I've reviewed the code of %Net.HttpRequest and I realized that the headers are being reseted, keeping just 3 basic headers for the redirection, so I've suggested to the customer a workaround, to send this header as a parameter in the URL or like a value in the body of the call. Am I right? Any better suggestion?

Product version: IRIS 2021.1
$ZV: IRIS for Windows (x86-64) 2021.1.3 (Build 389U) Wed Feb 15 2023 14:50:06 EST
Discussion (2)2
Log in or sign up to continue

Hello @Luis Angel Pérez Ramos 

as of my understanding, We can send the it's as a query parameter or http request body if the design supports. Incase the external system protocol was designed to handled the authorization and some additional custom headers are must be a request header Then it should be part of the headers section otherwise I believe it may creates some issue with the request/response.