Get header value from http request
Hi everyone,
I am currently sending an HTTP POST request to an EnsLib.HTTP.Service service (which has an EnsLib.HTTP.InboundAdapter associated). In this request there is just one header:
.png)
I wuold like to get it from my request . I have tried in several ways but I can't:
set reqFrom = %request.GetCgiEnv("HTTP_requestFrom")
set reqFrom = pInput.Attributes("requestFrom")
and working with the imbound adapter but it didn't work.
What is the correct way to do that?
Thank you in advance for your help.
Discussion (2)0
Comments
Hi Federico.
Try %request.GetCgiEnv("HTTP_REQUESTFROM")
To determine contents of %request, %response and %session objects you can add this to the beginning of your code
set %response.ContentType = "html"
do ##class(%CSP.Utils).DisplayAllObjects()
quit $$$OK
It would return detailed information about the request as an html page.