Skip To Content ArcGIS for Developers Sign In Dashboard

RequestConfiguration QML Type

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

Import Statement: import Esri.ArcGISRuntime 100.6
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's 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.


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.


issueAuthenticationChallengeChanged()

Emitted when the issueAuthenticationChallenge property changes.


maxNumberOfAttemptsChanged()

Emitted when the maxNumberOfAttempts property changes.


timeoutIntervalChanged()

Emitted when the timeoutInterval property changes.


userHeadersChanged()

Emitted when the userHeaders property changes.


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.



Feedback on this topic?