Skip to content
New issue

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

Cancel-able requests #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

michaeltyson
Copy link

I noticed that if you perform requests asynchronously, but you release the delegate before completion (e.g. close the view controller that's asynchronously loading the name of the logged-in twitter user), you'll get a crash when the nonexistent delegate is messaged.

SHA: 973a8ff makes MPOAuthAPI return the request loaders, and adds a -cancel method to MPOAuthAPIRequestLoader so that it's possible to cancel requests.

Apologies for the other changes in this pull request, which you've already looked at - I can't seem to exclude them from the pull request.

Added correct setting of "authenticationState" parameter to reflect state
Revised OAuth data parsing to better handle unexpected responses
Added support for POST queries with application/x-www-form-urlencoded mime types
Added class method on MPOAuthURLRequest to extract an OAuth Authorization header value from a parameter string, to integrate with other Twitter utilities via OAuth Echo
Conflicts:
	Source/Framework/MPOAuthURLRequest.m
@thekarladam
Copy link
Owner

Weird, I coulda swore I'd fixed this. Did you pull any of the later changes I'd made or is this on the previous version of the code that you had?

@michaeltyson
Copy link
Author

Oh, really? There's a chance I'm using it wrong! Is there another way to interrupt requests?

Yep, I pulled the latest stuff.

@thekarladam
Copy link
Owner

Yea, you're right, you did. I guarded against the crash at some point, but no I did not add the ability to cancel the load request entirely so I'll certainly merge that in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants