mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #211] Provide a cancel function on OAuthSwiftHTTPRequest #120
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FGoessler on GitHub (Apr 1, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/211
It would be nice to cancel running HTTP requests. NSURLSessionTask offers a simple API for that (just call cancel), but since the NSURLSessionTask is not exposed in the OAuthSwiftHTTPRequest class we cannot access it.
One could either provide a method on OAuthSwiftHTTPRequest to cancel the request or just expose the underlying task as a property.
@phimage commented on GitHub (Apr 1, 2016):
Add near
sessionan attributetaskintoOAuthSwiftHTTPRequestand provide thestoporcancelfunction (function which do nothing if no task)or alternatively add a callback on
startmethod to get thetask...You can PR