Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

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.

0
malibrahim
Asked:
malibrahim
  • 2
1 Solution
 
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
 
John844Commented:
dim strHeader
strHeader = Request.ServerVariables("ALL_RAW")
0
 
malibrahimAuthor Commented:
Thanks for the Fast reply :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now