ClientSettings

public struct ClientSettings
extension ClientSettings: Sendable
extension ClientSettings: Equatable, Hashable
  • Timeout for the entire request in ms (0 indicates no timeout).

    Declaration

    Swift

    public var timeout: UInt32
  • Maximum amount of redirects to follow (0 means redirects are not allowed)

    Declaration

    Swift

    public var redirectLimit: UInt32
  • OHTTP channel to use for all requests (if any)

    Declaration

    Swift

    public var ohttpChannel: String?
  • Client default user-agent.

    This overrides the global default user-agent and is used when no User-agent header is set directly in the Request.

    Declaration

    Swift

    public var userAgent: String?
  • Declaration

    Swift

    public init(
        /**
         * Timeout for the entire request in ms (0 indicates no timeout).
         */timeout: UInt32 = UInt32(0), 
        /**
         * Maximum amount of redirects to follow (0 means redirects are not allowed)
         */redirectLimit: UInt32 = UInt32(10), 
        /**
         * OHTTP channel to use for all requests (if any)
         */ohttpChannel: String?, 
        /**
         * Client default user-agent.
         *
         * This overrides the global default user-agent and is used when no `User-agent` header is set
         * directly in the Request.
         */userAgent: String? = nil)
  • Declaration

    Swift

    public static func == (lhs: ClientSettings, rhs: ClientSettings) -> Bool
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)