NetworkOptions

open class NetworkOptions : ObjectBase

Options for interaction with a data network.

  • A handler for all HTTP requests made by the data service.

    Declaration

    Swift

    final public var httpHandler: HTTPHandler?
  • Should requests be compressed (if this is supported by the client and by the server)? True by default.

    Declaration

    Swift

    final public var compressRequests: Bool
  • Should responses be compressed (if this is supported by the client and by the server)? True by default.

    Declaration

    Swift

    final public var compressResponses: Bool
  • Should downloads be streamed? Set this to false to force the use of non-streamed downloads. True by default.

    See also

    DataService.downloadMedia, DataService.downloadStream.

    Declaration

    Swift

    final public var streamDownloads: Bool
  • Should uploads be streamed? Set this to false to force the use of non-streamed uploads. True by default.

    See also

    DataService.createMedia, DataService.uploadMedia, DataService.uploadStream.

    Declaration

    Swift

    final public var streamUploads: Bool
  • Should HTTP verb tunneling be allowed in preference to OData batch requests? Defaults to false.

    Declaration

    Swift

    final public var allowTunneling: Bool
  • Which HTTP methods must be tunneled in HTTP POST due to proxy/firewall issues?

    See also

    allowTunneling.

    Declaration

    Swift

    final public var tunneledMethods: StringList
  • Which HTTP header can be used for tunneling, if it is required? Defaults to “X-HTTP-Method”.

    See also

    allowTunneling.

    Declaration

    Swift

    final public var tunnelingHeader: String
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Does the server accept gzip of request content? Defaults to false. Will be automatically set when metadata is loaded if EntityContainer has annotation for “Org.OData.Capabilities.V1.AcceptableEncodings” including “gzip”.

    Declaration

    Swift

    @inline(__always)
    public final var gzipAcceptable: Bool { get set }