ArcGIS Runtime SDK for iOS: AGSRequestConfiguration Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSRequestConfiguration Class Reference

Description

Networking related configuration of resources.

Instances of this class represent networking related configuration of resources (AGSRemoteResource). You can access the default configuration used by all resources using globalConfiguration (AGSRequestConfiguration).

You can change the configuration of any resource individually by specifying it using AGSRemoteResource::requestConfiguration, or you can change it for all resources using setGlobalConfiguration: (AGSRequestConfiguration).

Since
100
Inheritance diagram for AGSRequestConfiguration:

Class Methods

(NSString *) + additionalUserAgentInfo
 
(AGSRequestConfiguration *) + globalConfiguration
 
(void) + setAdditionalUserAgentInfo:
 
(void) + setGlobalConfiguration:
 

Properties

BOOL allowsBackgroundSessionForDownloads
 
BOOL allowsCellularAccessForDownloads
 
NSTimeInterval backgroundTimeoutInterval
 
BOOL debugLogDeleteBeforeEachRun
 
NSURL * debugLogFileURL
 
BOOL debugLogIgnoreTiledLayerRequests
 
BOOL debugLogIncludeRequestHeaders
 
BOOL debugLogIncludeResponseHeaders
 
BOOL debugLogIncludeTimestamp
 
BOOL debugLogRequests
 
BOOL debugLogResponses
 
NSUInteger debugLogResponseTrimThreshold
 
BOOL forcePost
 
NSURLRequestCachePolicy requestCachePolicy
 
BOOL shouldCacheResponse
 
BOOL(^ shouldIssueAuthenticationChallenge )(AGSAuthenticationChallenge *challenge)
 
NSTimeInterval timeoutInterval
 
NSDictionary< NSString *, NSString * > * userHeaders
 

Method Documentation

◆ additionalUserAgentInfo

+ (NSString*) additionalUserAgentInfo

Class method to retrieve the additional user agent string.

Since
100

◆ globalConfiguration

+ (AGSRequestConfiguration*) globalConfiguration

The global AGSRequestConfiguration object that is used for resources that do not have a configuration specified.

Since
100

◆ setAdditionalUserAgentInfo:

+ (void) setAdditionalUserAgentInfo: (nullable NSString *)  additionalInfo

Used to set some specific user agent information. This is useful for analytics.

Parameters
additionalInfoto send along in the user agent string
Since
100

◆ setGlobalConfiguration:

+ (void) setGlobalConfiguration: (AGSRequestConfiguration *)  globalConfiguration

Set the global request configuration. This will affect any AGSRemoteResource objects that are using the globalConfiguration. Resources are using the globalConfiguration if their requestConfiguration property is nil.

Parameters
globalConfigurationThe request configuration you want to set as global configuration
Since
100

Property Documentation

◆ allowsBackgroundSessionForDownloads

- (BOOL) allowsBackgroundSessionForDownloads
readwritenonatomicassign

Specifies whether or not downloading files is allowed in the background. The default setting is YES.

Since
100.1

◆ allowsCellularAccessForDownloads

- (BOOL) allowsCellularAccessForDownloads
readwritenonatomicassign

Specifies whether or not cellular access can be used to download files. This will only affect AGSRequestOperation's that have set the outputFileURL parameter. The default setting is YES.

Since
100

◆ backgroundTimeoutInterval

- (NSTimeInterval) backgroundTimeoutInterval
readwritenonatomicassign

The timeout interval (in seconds) for web requests when the application is in the background. Default value is 20 seconds.

Since
100.2

◆ debugLogDeleteBeforeEachRun

- (BOOL) debugLogDeleteBeforeEachRun
readwritenonatomicassign

Indicates whether to delete existing log file before logging begins.

Note
Default value is true. If false, logs will be appended to the existing file at AGSRequestConfiguration::debugLogFileURL, if any.
Since
100.7

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogFileURL

- (NSURL*) debugLogFileURL
readwritenonatomicstrong

Full path to the debug file location, including file name with extension. This property identifies the file when debug messages are logged for requests and responses. The default value is nil. If this property is nil and logging is turned on, the logs are written to the debug console instead of to a file.

If the file exists when the application starts, it may be deleted or appended to depending on the setting of the property AGSRequestConfiguration::debugLogDeleteBeforeEachRun. If the file does not exist when the application starts, it will be created. The file can grow large quickly, so do not leave logging on for longer than necessary, and remove the file when it is no longer needed.

The file is written in Markdown format for easy visual parsing in a markdown previewing application, so the file name extension ".md" is recommended. Certain sensitive information including tokens, user names, and passwords are masked in the log file.

Note
Default value is nil.
Since
100

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogIgnoreTiledLayerRequests

- (BOOL) debugLogIgnoreTiledLayerRequests
readwritenonatomicassign

Indicates whether to log tiled layer requests after the layer is loaded.

Note
Default value is false. If true, tiled layer requests will not be logged after the layer is loaded.
Since
100.7

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogIncludeRequestHeaders

- (BOOL) debugLogIncludeRequestHeaders
readwritenonatomicassign

Indicates whether to log request headers with requests.

Note
Default value is false. This property applies only when AGSRequestConfiguration::debugLogRequests is true.
Since
100.1

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogIncludeResponseHeaders

- (BOOL) debugLogIncludeResponseHeaders
readwritenonatomicassign

Indicates whether to log response headers with responses.

Note
Default value is false. This property applies only when AGSRequestConfiguration::debugLogResponses is true.
Since
100

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogIncludeTimestamp

- (BOOL) debugLogIncludeTimestamp
readwritenonatomicassign

Indicates whether to include time stamps with log entries when logging to a file.

Note
Default value is true. This property applies only when logging to a file. Time stamps are always generated by the console log.
Since
100.7

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogRequests

- (BOOL) debugLogRequests
readwritenonatomicassign

Indicates whether to log requests.

Note
Default value is false.
Since
100

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogResponses

- (BOOL) debugLogResponses
readwritenonatomicassign

Indicates whether to log responses.

Note
Default value is false.
Since
100

Provided by category AGSRequestConfiguration(Debug).

◆ debugLogResponseTrimThreshold

- (NSUInteger) debugLogResponseTrimThreshold
readwritenonatomicassign

Maximum number of characters to log for each response string.

Note
Default value is 0, meaning no maximum number of characters.
Since
100.7

Provided by category AGSRequestConfiguration(Debug).

◆ forcePost

- (BOOL) forcePost
readwritenonatomicassign

Whether or not the http/s method is forced to be POST. Default is NO.

Since
100

◆ requestCachePolicy

- (NSURLRequestCachePolicy) requestCachePolicy
readwritenonatomicassign

The cache policy that should be used for making web requests to the remote resource. Default value is NSURLRequestUseProtocolCachePolicy

Since
100

◆ shouldCacheResponse

- (BOOL) shouldCacheResponse
readwritenonatomicassign

Whether the response should be cached. Default is YES.

Since
100

◆ shouldIssueAuthenticationChallenge

- (BOOL(^ shouldIssueAuthenticationChallenge) (AGSAuthenticationChallenge *challenge))
readwritenonatomiccopy

A block specifying whether or not AGSAuthenticationChallenge::challengeHandler should be invoked to handle authentication challenges for the remote resource. If the block returns NO, any security errors encountered with web requests to this remote resource will result in failure. Default is nil, in which case the challenge handler will be invoked. You should set a custom handler to perform authentication and potentially recover from any security errors.

Since
100

◆ timeoutInterval

- (NSTimeInterval) timeoutInterval
readwritenonatomicassign

The timeout interval (in seconds) for web requests. Default value is 60 seconds.

Since
100

◆ userHeaders

- (NSDictionary<NSString*,NSString*>*) userHeaders
readwritenonatomiccopy

Any custom headers you would like to set on the request with the exception of User-Agent and Content-Type. If you need to add info to the User-Agent header use AGSRequest::setAdditionalUserAgentInfo: .

Since
100