DuplicateHeaderBehavior

public enum DuplicateHeaderBehavior : Sendable

Type that determines the action taken when the URLRequest already has a Content-Encoding header.

  • Throws a DuplicateHeaderError. The default.

    Declaration

    Swift

    case error
  • Replaces the existing header value with deflate.

    Declaration

    Swift

    case replace
  • Silently skips compression when the header exists.

    Declaration

    Swift

    case skip