Retrieving M-Business Client HTTP request headers

Note

Information for select HTTP request headers is available to the M-Business Sync Server through server URL macros, without the need to retrieve or decode it. For more information, see Using server URL macros to customize content.

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 M-Business 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.