W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

Re: How to set a 'Useragent' header?

From: Jeff Adams <jeffa@coursewave.com>
Date: Mon, 19 Feb 2001 12:18:56 -0600
Message-ID: <3A916390.EB4FF855@coursewave.com>
To: Ilya Kiselyov <ilya@ostankino.ru>
CC: www-lib@w3.org
Ilya Kiselyov wrote:
> 
> Hello All!
> 
> I'm trying to write a simple www-client application. How can I set the
> 'Useragent' header to what I want in the request?
> 
> --
> Best regards,
>  Ilya Kiselyov <ilya@ostankino.ru>

Is it enough to simply make the useragent used the same for 
all requests? because you can pass in your custom useragent at the
time the profile is created:

    /* Create a new premptive client */
    HTProfile_newHTMLNoCacheClient(USERAGENT_NAME, USERAGENT_VERSION);

Also the docs in HTLib show that the app name and version are used as
the
useragent and version so calling:

HTLib_setAppName (const char * name);
and
HTLib_setAppVersion (const char * version);

might also do the trick for you if you might need to change this
during runtime?

Jeff
Received on Monday, 19 February 2001 13:16:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:38 GMT