-
Notifications
You must be signed in to change notification settings - Fork 34
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
Shouldn't AFHTTPRequestOperation return some data? #2
Comments
Hmm, the category declares -responseObject for the subclasses. I suppose it'd be reasonable to return I'm guessing you're not using a subclass, right? Also, are you still using AFNetworking 1.x? |
Wow, that was fast! |
Cool, yeah, I haven't used AFN 2 yet. I watched some of the patches go by and I think the synchronous case may be easy to handle in the new version. If not this will need rewriting to accommodate it. It sounds strange, but I hadn't considered the use case where you use the data directly rather than in a subclass. Some programmers might want I'll get this changed tonight. Thanks for the patch! |
You're welcome! |
I was very pleased to find Your category for AFNetworking, I was in need for handling a specific synchronous case in my otherwise async app.
But to my surprise, although I didn't get any errors, I never seemed to get any data back...
And after spending sometime in the debugger, I noticed that the implementation of the AFHTTPRequestOperation (ResponseObject) ALWAYS returned nil.
Replacing that with a simple "return [self responseData]" solved the problem for me.
Unfortunate, I'm not a experienced Git contributor, so I have no idea how to contribute to the code, so this will be my contribution... :-)
The text was updated successfully, but these errors were encountered: