ssCore.HTTP.userAgent

Sets the value for the user agent header that is sent with each request.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

userAgent - The user agent string (see http://www.mozilla.org/build/revised-user-agent-strings.html for details).


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.HTTP.userAgent( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.HTTP.userAgent( paramsObject );


Notes:

The User-Agent request-header field contains information about the user agent originating the request. This is used for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations.

                

Examples:

The following example sets the user agent to that of a mozilla.org release.

ssCore.HTTP.userAgent({userAgent:"Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101"});