Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Return AFHTTPRequestOperation in failure blocks. #111

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

Conversation

nickhrsn
Copy link

The commit allows authentication failures to be processed in the same way as a standard AFNetworking request.

Processing HTTP response codes on an authentication request is messy when the only parameter being returned is an NSError. Instead of translating NSError codes, I opted for returning the operation as well; just like regular AFNetworking requests.

This problem was identified while shifting the OzGuild platform to OAuth 2.0, and I thought it would be useful to others in a similar position.

@nickhrsn
Copy link
Author

This is actually a patch for issue #84, after reading into it further.

@nickhrsn nickhrsn force-pushed the authentication-error branch from df3ab14 to 54f07d4 Compare July 11, 2019 08:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant