Configuration parameters that apply to network requests. More...
|Import Statement:||import Esri.ArcGISRuntime 100.6|
- forcePost : bool
- issueAuthenticationChallenge : bool
- maxNumberOfAttempts : int
- timeoutInterval : int
- userHeaders : jsobject
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.
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
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
The maximum number of times the request should be attempted before failing completely and emitting an error.
Emitted when the forcePost property changes.
Emitted when the issueAuthenticationChallenge property changes.
Emitted when the maxNumberOfAttempts property changes.
Emitted when the timeoutInterval property changes.
Emitted when the userHeaders property changes.
Returns the additional information that is appended to the User-Agent header field in all HTTP requests.
See also setAdditionalUserAgentInfo.
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.