RequestOptions
open class RequestOptions : ObjectBase
Options for processing of data requests.
If request options are used for repeatable requests, a new request options object should be used for each distinct request (or the repeatability properties should be reset before object re-use). The repeated execution of a failed request should re-use the original request options object without repeatable being reset beforehand.
-
Immutable value for “no” request options.
Declaration
Swift
public static let none: RequestOptions -
Default initializer.
Declaration
Swift
override public init() -
In offline scenarios, can this request be combined with a previous request? Defaults to
true. A delete request can be combined with a previous create request by canceling the create request. An update request can be combined with a previous create or update request by merging the newly changed properties with the previously changed properties.Declaration
Swift
open var canCombineRequests: Bool { get set } -
Set this to a cancellation token before initiating an async request if request cancellation may be needed.
Declaration
Swift
open var cancelToken: CancelToken? { get set } -
Set the
cancelTokenand return this options object.Declaration
Swift
open func cancelable(_ token: CancelToken) -> RequestOptionsParameters
tokenCancellation token.
Return Value
This options object.
-
Enable capturing of response headers into the specified object (which should have type
HTTPHeaders).Declaration
Swift
open var captureResponseHeaders: AnyObject? { get set } -
In offline scenarios, can this request be grouped with others having the same atomicity group? Intended as a performance optimization where grouping requests in a single transaction gives throughput benefits. Any such grouping is not guaranteed for requests having the same atomicity group, as there may be inter-request dependencies that prevent the grouping.
Declaration
Swift
open var changeSet: String? { get set } -
Declaration
Swift
open func copy() -> RequestOptionsReturn Value
a new (mutable) request options object that is a copy of this request options object.
-
Set the
customTagand return this options object.Declaration
Swift
open func custom(_ tag: String) -> RequestOptionsParameters
tagCustom tag.
Return Value
This options object.
-
Set this to a custom tag when submitting a request for later upload in an offline scenario.
Declaration
Swift
open var customTag: String? { get set } -
Must entities for offline create requests be retained after successful upload? Defaults to
true.Declaration
Swift
open var mustRetainCreates: Bool { get set } -
Set the
canCombineRequestsproperty tofalseand return this options object.Declaration
Swift
open func noCombine() -> RequestOptionsReturn Value
This options object.
-
Set the
mustRetainCreatesproperty tofalseand return this options object.Declaration
Swift
open func noRetain() -> RequestOptionsReturn Value
This options object.
-
Declaration
Swift
open class func noneIfNull(options: RequestOptions?) -> RequestOptionsParameters
optionsOptions to be checked.
Return Value
The
optionsparameter, if non-nil; otherwisenone. -
Should create/update requests receive no content in the response? Defaults to
false.Declaration
Swift
open var preferNoContent: Bool { get set } -
Repeatability first sent time for this request.
See also
repeatable.Declaration
Swift
open var repeatabilityFirstSent: GlobalDateTime? { get set } -
Repeatability global request ID for this request.
See also
repeatable.Declaration
Swift
open var repeatabilityRequestID: GuidValue? { get set } -
Set the
repeatabilityRequestIDandrepeatabilityFirstSentand return this options object.Declaration
Swift
open func repeatable(requestID: GuidValue, firstSent: GlobalDateTime) -> RequestOptionsParameters
requestIDValue for
repeatabilityRequestID.firstSentValue for
repeatabilityFirstSent.Return Value
This options object.
-
Should no-change update requests be sent to the server? Defaults to
false.Declaration
Swift
open var sendEmptyUpdate: Bool { get set } -
Set the
updateModeand return this options object.Declaration
Swift
open func update(_ mode: UpdateMode) -> RequestOptionsParameters
modeUpdate mode.
Return Value
This options object.
-
Determines if updates use merge (HTTP PATCH) or replace (HTTP PUT) semantics. Defaults to merge semantics.
Declaration
Swift
open var updateMode: UpdateMode { get set } -
Set the
uploadGroupand return this options object.Declaration
Swift
open func upload(_ group: String) -> RequestOptionsParameters
groupUpload group.
Return Value
This options object.
-
In offline scenarios, can this request be grouped with others to enable selective uploading by group name?
Declaration
Swift
open var uploadGroup: String? { get set } -
Set
useBatchRequesttotrueand this options object.Declaration
Swift
open func useBatch() -> RequestOptionsReturn Value
This options object.
-
Should this request be tunneled inside a batch request, e.g. for security reasons.
Declaration
Swift
open var useBatchRequest: Bool { get set }