TargetType

public protocol TargetType

The protocol used to define the specifications necessary for a MoyaProvider.

  • The target’s base URL.

    Declaration

    Swift

    var baseURL: URL { get }
  • The path to be appended to baseURL to form the full URL.

    Declaration

    Swift

    var path: String { get }
  • The HTTP method used in the request.

    Declaration

    Swift

    var method: Moya.Method { get }
  • Provides stub data for use in testing.

    Declaration

    Swift

    var sampleData: Data { get }
  • The type of HTTP task to be performed.

    Declaration

    Swift

    var task: Task { get }
  • validationType Default implementation

    The type of validation to perform on the request. Default is .none.

    Default Implementation

    The type of validation to perform on the request. Default is .none.

    Declaration

    Swift

    var validationType: ValidationType { get }
  • The headers to be used in the request.

    Declaration

    Swift

    var headers: [String : String]? { get }