Child pages
  • HttpClientConfig
Skip to end of metadata
Go to start of metadata

Refresh page Feb 19, 2024 21:34

Supported Clients
SmartClient WebClient NGClient

Property Summary
Number keepAliveDuration Gets/Sets keep alive duration in seconds for a connection, default is -1 (no duration specified).
Number maxIOThreadCount Gets/Sets maximum number of input/output threads per client, default value is 2.
String protocol Gets/Sets which TLS protocol to use, default value is TLS.
String userAgent Gets/Sets custom userAgent to use.

Property Details

keepAliveDuration

Gets/Sets keep alive duration in seconds for a connection, default is -1 (no duration specified).

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var config = plugins.http.createNewHttpClientConfig();
config.keepAliveDuration = 5;
var client = plugins.http.createNewHttpClient(config);

maxIOThreadCount

Gets/Sets maximum number of input/output threads per client, default value is 2.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var config = plugins.http.createNewHttpClientConfig();
config.maxIOThreadCount = 5;
var client = plugins.http.createNewHttpClient(config);

protocol

Gets/Sets which TLS protocol to use, default value is TLS.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var config = plugins.http.createNewHttpClientConfig();
config.protocol = "TLSv1.2";
var client = plugins.http.createNewHttpClient(config);

userAgent

Gets/Sets custom userAgent to use.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var config = plugins.http.createNewHttpClientConfig();
config.userAgent = "Mozilla/5.0 Firefox/26.0";
var client = plugins.http.createNewHttpClient(config);

  • No labels