Behavior

public enum Behavior : Sendable

Defines the behavior of the Redirector type.

  • Follow the redirect as defined in the response.

    Declaration

    Swift

    case follow
  • Do not follow the redirect defined in the response.

    Declaration

    Swift

    case doNotFollow
  • Modify the redirect request defined in the response.

    Declaration

    Swift

    case modify(@Sendable (_ task: URLSessionTask, _ request: URLRequest, _ response: HTTPURLResponse) -> URLRequest?)