Task
public protocol Task
Protocol responsible to defining
-
method
Default implementationHTTP 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 implementationCustom headers for request
Default Implementation
Default empty headers
Declaration
Swift
var headers: Headers
-
parameters
Default implementationOptional parameters for request
Default Implementation
Default empty parameters
Declaration
Swift
var parameters: Parameters
-
encoding
Default implementationEncoder parameters for url
Default Implementation
Default JSON encoding
Declaration
Swift
var encoding: Encoding
-
request(with:)
Extension methodGenerate
URLRequest
with baseURL
and specific valuesDeclaration
Swift
func request(with baseURL: URL) -> URLRequest