UserAgent Property  
 

Gets and sets the current user agent value which identifies the application.

Syntax

object.UserAgent [= UserAgent ]

Remarks

The UserAgent property identifies the application that is issuing the request to the server. This is a string value that should be defined using the following format:

Application[/Version] [(Additional Information)]

For example, if the name of your application is "MyProgram" and the current version is 2.0, then you could specify a user agent string as follows:

MyProgram/2.0

The additional information included with the user agent string should be enclosed in parenthesis and can include the operating system, version and build numbers for additional components as well as any other information that you wish to include. Multiple items should be separated by semicolons. It is recommended that the user agent string not be greater than 128 characters in length.

This value is only used with standard and secure HTTP connections. Some web services check the value of the user agent string to determine if a compatible client is being used to issue the request. The default value used by SocketTools is designed to emulate a common browser, but some services may require you change the user agent to use a specific value or include certain product names and versions.

Data Type

String

See Also

ServerType Property