Developers
AvantGo Channel Developer Guide

TOC PREV NEXT INDEX


Retrieving AvantGo Client HTTP request headers

And how exactly do I retrieve HTTP request headers?

That depends on what you are using to create these dynamic pages in the first place. A server running a cgi-bin script, for example, will pass along these values as environment variables with a slightly different name: the whole header is capitalized, hyphens are replaced with underscores, and HTTP_ is prepended to the header. For example, the AvantGo Client request header X-AvantGo-DeviceOS is sent across as the environment variable HTTP_X_AVANTGO_DEVICEOS.

If you are using Perl with the CGI library installed, you can use a HTTP('HTTP_X_AVANTGO_DEVICEOS') function to retrieve the value of the X-AvantGo-DeviceOS header. Actually, the HTTP() function is smart enough to understand that HTTP('X-AvantGo-DeviceOS') is the same thing.

Ask your local webmaster if you need more help decoding HTTP headers for your particular method of serving up web pages.



TOC PREV NEXT INDEX