Equinox Online Help - Language Reference - A to Z

Home

WebGetHeader

Applies to
SyntaxWebGetHeader [header field], variable
Action[statement] Assigns a header value to a variable
ScopeUsed in method language on an ESP page.
Notes

WebGetHeader will read the value of a specified request header field and assign it to a variable.

For more information on Headers, see Resources

CategoryWeb Server
See Also WebBaseDirectory, WebCurrentPage, WebGetCookies, WebOutput, WebOutputFile, WebParameter, WebPostData, WebRedirect, WebSetCookie, WebSetHeader
Example

This example demonstrates the assignment of a header field to a variable that then generates an output depending on its value.

WebGetHeader “Accept-Language“, lang

if lang contains “en” then
WebOutput “You have stated a preference for pages in English”
else
WebOutput “You have no preference for pages in English”
end if