Lasso Soft Inc. > Home

[ web_request->header ]

Method

The [web_request->header] method takes a string specifying an HTTP header and returns the value for that header that the client sent to the web server.

  • Syntax
web_request->header('header-name')
Examples
  • Beginner

Display the User-Agent header

The code below will display the User-Agent header sent to the web server by the browser. The example result is the user-agent for Safari on Mac OS X.

Code

web_request->header('user-agent')

Result

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft