We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug File upload (or download) has confusing behaviour - function is async, but it returns Alamofire.UploadRequest.
async
Alamofire.UploadRequest
Expected behavior A1) function is synchronous, throws on failure and returns UploadRequest
UploadRequest
func uploadWithMultipart(...) throws(NetworkError) -> UploadRequest
A2) 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 -> Result
Result => some, at the time of reporting unknown concrete result type. Can be from Alamofire/local enum/Swift's Result type etc.
The text was updated successfully, but these errors were encountered:
andrej-jasso
No branches or pull requests
Describe the bug
File upload (or download) has confusing behaviour - function is
async
, but it returnsAlamofire.UploadRequest
.Expected behavior
A1) function is synchronous, throws on failure and returns
UploadRequest
A2) function is synchronous, doesn't return, accepts a completion handler
B1) function is asynchronous, doesn't return, and ends after file upload/download is complete or throws
B2) function is asynchronous, returns the result of upload/download operation after file upload/download is complete
Result => some, at the time of reporting unknown concrete result type. Can be from Alamofire/local enum/Swift's Result type etc.
The text was updated successfully, but these errors were encountered: