
| home | AJAX (8) || C#.NET (7) || Coldfusion Development (16) || DHTML (15) || Flash Development (19) || jQuery (8) || MSSQL (2) || UNIX (10) |
| 6.19.07 | Get Client Request Headers in Coldfusion |
Have you needed to acquire the exact values of a specific request header from the client? Do the default CGI variables in Coldfusion not offer access to a specific request header that you need?
If so, the fabled getPageContext() method offers easy access to the string values of these request headers.
<cfoutput>#getPageContext().getRequest().getHeader("Host")#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader("Cookie")#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader("User-Agent")#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader("Referer")#</cfoutput>
No comments