Task
public enum Task
Represents an HTTP task.
-
A request with no additional data.
Declaration
Swift
case requestPlain
-
A requests body set with data.
Declaration
Swift
case requestData(Data)
-
A request body set with
Encodable
typeDeclaration
Swift
case requestJSONEncodable(Encodable)
-
A request body set with
Encodable
type and custom encoderDeclaration
Swift
case requestCustomJSONEncodable(Encodable, encoder: JSONEncoder)
-
A requests body set with encoded parameters.
Declaration
Swift
case requestParameters(parameters: [String : Any], encoding: ParameterEncoding)
-
A requests body set with data, combined with url parameters.
Declaration
Swift
case requestCompositeData(bodyData: Data, urlParameters: [String : Any])
-
A requests body set with encoded parameters combined with url parameters.
Declaration
Swift
case requestCompositeParameters(bodyParameters: [String : Any], bodyEncoding: ParameterEncoding, urlParameters: [String : Any])
-
A file upload task.
Declaration
Swift
case uploadFile(URL)
-
A
multipart/form-data
upload task.Declaration
Swift
case uploadMultipart([MultipartFormData])
-
A
multipart/form-data
upload task combined with url parameters.Declaration
Swift
case uploadCompositeMultipart([MultipartFormData], urlParameters: [String : Any])
-
A file download task to a destination.
Declaration
Swift
case downloadDestination(DownloadDestination)
-
A file download task to a destination with extra parameters using the given encoding.
Declaration
Swift
case downloadParameters(parameters: [String : Any], encoding: ParameterEncoding, destination: DownloadDestination)