FileUploadable
public protocol FileUploadable: AFileUploadable, Uploadable
Represents a FileUploadable
for Restofire.
Create custom FileUploadable
protocol HTTPBinUploadService: FileUploadable {
var path: String? = "post"
let url: URL = FileManager.url(forResource: "rainbow", withExtension: "jpg")
}
-
response(_:)
Extension methodCreates a
UploadOperation
for the specifiedUploadable
object and asynchronously executes it.Declaration
Swift
public func response(_ completionHandler: ((DataResponse<Response>) -> Void)? = nil) -> UploadOperation<Self>
Parameters
completionHandler
A closure to be executed once the download has finished.
nil
by default.Return Value
The created
UploadOperation
.