Question

Not able to read HTTP Header information

Hi,

I am working on POC to read HTTP header information from pega.

Requirement: From external application Pega app link will be clicked, while posting this request to app server, also includes userid in header of this request.

Once auth service got called, reading the headers through

"

@java("((javax.servlet.http.HttpServletRequest)tools.getRequestor().getRequestorPage().getObject(\"pxHTTPServletRequest\")).getHeader(\"<VALUE TO READ>\")") . 

Put this in a Property-Step step.  For example: Param.myParam                =        @java("((javax.servlet.http.HttpServletRequest)tools.getRequestor().getRequestorPage().getObject(\"pxHTTPServletRequest\")).getHeader(\"<VALUE TO READ>\")")

Result: its failing to read.

***Updated by Moderator: Marissa to update categories***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
October 17, 2016 - 5:20pm

THis Issue we have resolved by addign some java script

Comments

Keep up to date on this post and subscribe to comments

November 4, 2015 - 11:45am

Make sure you are passing the correct header parameter. The above mentioned method is correct to read the header values.

November 4, 2015 - 4:46pm

Do we have any sample code available?, where I can construct the Pega Acceptable header information in a request?,like html page to post header with pega URl..

Pega
November 4, 2015 - 4:53pm
Response to sasi_chow

Moving this to the Product Support space as this is a Pega 7  question.

Thanks

Wayne

October 17, 2016 - 5:20pm

THis Issue we have resolved by addign some java script

December 22, 2016 - 4:40am
Response to sasi_chow

Hi Sasi_Chow,

Could you please confirm what is that java script code that helped in resolving the issue?