Hi,
I've to add custom request header parameter to my URL, as I'll be receiving some information when customer lands on my application so Instead of adding a query parameter client suggested us to add custom request header parameter to my URL, ca anyone suggest how to add this to my home page URL
Thanks,
Sandeep.
Hi Sandeep,
Configure fetching your Request Header using this server action. You'll only need to pass the request header's parameter HeaderName. If they passed it in the request header, it will be accessible here.
Add dependency to HTTPRequestHandler module > Server Actions > GetRequestHeader, and use it to get the header value.
Hi @Ravi Punjwani we've already created the above mentioned logic, all I wanted to make sure is that, we don't need to add anything from our end right? they've pass the header parameter with the value, all we need to capture the header with the key right.
Yes that should be all good. To make sure from your end, just try your application URL from Postman by adding the required request headers and send request via GET method. You should be able to receive the request headers in your reactive app, as sent from Postman.
Hi, what if the same needs to be done vice versa, I mean if I need to call the other application URL from outsystems end by adding one extra custom header parameter.
Do you mean redirecting your browser's webpage to another URL including a request header? Or consuming a REST API with adding a Request Header?
Hi @Ravi Punjwani We've to call another URL by adding one custom header to it.
I know you've to call another URL (as you mentioned in the previous comment), which is why I'm asking you to understand your correct scenario.
Which situation applies to you?
Hi, I've to call another URL from my outsystems application using redirect node.
Please read this answer if you're trying to redirect from browser to external URLhttps://stackoverflow.com/a/35237462/1500601
I don't think it will be possible at all
How to achive the the same in Service Action. Using HTTPRequestHandler module > Server Actions > GetRequestHeader the new header not coming in response, nither able to read addithonal header in Service Action