Get the HTTP header (environment) usning ASP

Hi,
   I want to capture the HTTP header (environment) of a request where I get all the information in the HTTP header and assign it to a variable. Looking forward for your early reply.

malibrahimAsked:
Who is Participating?
 
John844Connect With a Mentor Commented:
dim strHeader
strHeader = Request.ServerVariables("ALL_RAW")
0
 
John844Commented:
Request.ServerVariables (server environment variable)

 

Parameters
server environment variable
Specifies the name of the server environment variable to retrieve. It can be one of the following values. Variable Description
ALL_HTTP All HTTP headers sent by the client.
ALL_RAW Retrieves all headers in raw form. The difference between ALL_RAW and ALL_HTTP is that ALL_HTTP places an HTTP_ prefix before the header name and the header name is always capitalized. In ALL_RAW the header name and values appear as they are sent by the client.  


Try Request.ServerVariables("ALL_HTTP")
or Request.ServerVariables("ALL_RAW")
0
 
malibrahimAuthor Commented:
Thanks for the Fast reply :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.