Task

public protocol Task

Protocol responsible to defining

  • method Default implementation

    HTTP verb for request

    Default Implementation

    Default HTTP GET Verb

    Declaration

    Swift

    var method: HTTPMethod
  • Relative path for request

    Declaration

    Swift

    var path: String
  • headers Default implementation

    Custom headers for request

    Default Implementation

    Default empty headers

    Declaration

    Swift

    var headers: Headers
  • parameters Default implementation

    Optional parameters for request

    Default Implementation

    Default empty parameters

    Declaration

    Swift

    var parameters: Parameters
  • encoding Default implementation

    Encoder parameters for url

    Default Implementation

    Default JSON encoding

    Declaration

    Swift

    var encoding: Encoding
  • request(with:) Extension method

    Generate URLRequest with base URL and specific values

    Declaration

    Swift

    func request(with baseURL: URL) -> URLRequest