-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
File upload (or download) has confusing behaviour - function is async, but it returns Alamofire.UploadRequest.
Expected behavior
A1) function is synchronous, throws on failure and returns UploadRequest
func uploadWithMultipart(...) throws(NetworkError) -> UploadRequestA2) function is synchronous, doesn't return, accepts a completion handler
func uploadWithMultipart(..., completionHandler: (Result) -> Void) throws(NetworkError)B1) function is asynchronous, doesn't return, and ends after file upload/download is complete or throws
func uploadWithMutlipart(...) async throws(NetworkError)B2) function is asynchronous, returns the result of upload/download operation after file upload/download is complete
func uploadWithMutlipart(...) async -> ResultResult => some, at the time of reporting unknown concrete result type. Can be from Alamofire/local enum/Swift's Result type etc.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working