RequestConfiguration QML Type

Configuration parameters that apply to network requests. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.1
Inherits:

Object

Properties

Signals

Methods

Detailed Description

There are several API types that perform one or more network requests as they perform their tasks. Sometimes it is useful to set parameters for these network requests. For example, you may want to set the maximum number of retries or a request timeout. Therefore, types that inherit the RemoteResource type give you access to these network request parameters. This RequestConfiguration type contains these parameters.

The global RequestConfiguration is used by objects that implement RemoteResource and have not set object-specific network request parameters. The default values for each parameter are listed on the property getters and setters of this type. You can replace the global default RequestConfiguration using the method ArcGISRuntimeEnvironment::globalRequestConfiguration. For example, you can change the global RequestConfiguration to add a HTML header to all requests without having to set a RequestConfiguration on every object.

Occasionally, different objects will need different RequestConfigurations. You can set one for any object that implements RemoteResource by using the RemoteResource::requestConfiguration property. The object-specific RequestConfiguration is used for any request made through the context of that object, such as all requests made using a specific Portal instance. The object-specific RequestConfiguration overrides the global RequestConfiguration mentioned above.

To stop using an object-specific RequestConfiguration that you previously set, set it to null. After this is done, requests made through that object will use the properties in the global RequestConfiguration.

See also RemoteResource and ArcGISRuntimeEnvironment.

Property Documentation

forcePost : bool

Whether network requests will be forced as a POST request.

If true, then even requests which normally use GET will be forced to use POST. Otherwise, it will use GET or POST depending on the default behavior of the request.

Default value is false.


globalNetworkCacheConfiguration : NetworkCacheConfiguration

The global network request configuration.

This property was introduced in Esri.ArcGISRuntime 100.8.


issueAuthenticationChallenge : bool

Whether an authentication challenge should be issued upon failure to access the requested resource.

If true, then the challenge handler will be invoked to prompt the user for credentials. Otherwise, secured services will simply fail. A custom challenge handler may be set if desired.

Default value is true.

See also AuthenticationChallenge and AuthenticationManager.


maxNumberOfAttempts : int

The maximum number of times the request should be attempted before failing completely and emitting an error.

Default is 5.


timeoutInterval : int

The time out interval for requests (in seconds).

Default is 60 seconds.


userHeaders : jsobject

The custom headers to be added to any outgoing HTTP request.


Signal Documentation

forcePostChanged()

Emitted when the forcePost property changes.

Note: The corresponding handler is onForcePostChanged.


issueAuthenticationChallengeChanged()

Emitted when the issueAuthenticationChallenge property changes.

Note: The corresponding handler is onIssueAuthenticationChallengeChanged.


maxNumberOfAttemptsChanged()

Emitted when the maxNumberOfAttempts property changes.

Note: The corresponding handler is onMaxNumberOfAttemptsChanged.


timeoutIntervalChanged()

Emitted when the timeoutInterval property changes.

Note: The corresponding handler is onTimeoutIntervalChanged.


userHeadersChanged()

Emitted when the userHeaders property changes.

Note: The corresponding handler is onUserHeadersChanged.


Method Documentation

string additionalUserAgentInfo()

Returns the additional information that is appended to the User-Agent header field in all HTTP requests.

See also setAdditionalUserAgentInfo.


void setAdditionalUserAgentInfo(string additionalUserAgentInfo)

Sets the additional information that is appended to the User-Agent header field in all HTTP requests to additionalUserAgentInfo.

This is used in some cases to identify the name and version of the application software.

The default value is an empty string.

See also additionalUserAgentInfo().


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.