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
is there any way to retry a task or i have to implement it by my self? i mean retry a task after receiving the response :
//handle task finishing public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { guard let resp = responseForTask(task) else { return } resp.error = error as NSError? if let hresponse = task.response as? HTTPURLResponse { resp.headers = hresponse.allHeaderFields as? Dictionary<String,String> resp.mimeType = hresponse.mimeType resp.suggestedFilename = hresponse.suggestedFilename resp.statusCode = hresponse.statusCode resp.URL = hresponse.url } if let code = resp.statusCode, code > 299 { //-1001// resp.error = createError(code) } if let handler = resp.completionHandler { handler(resp) } removeTask(task) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
is there any way to retry a task or i have to implement it by my self? i mean retry a task after receiving the response :
The text was updated successfully, but these errors were encountered: