Code Monkey home page Code Monkey logo

Comments (4)

paulmelnikow avatar paulmelnikow commented on May 18, 2024

Hmm, the category declares -responseObject for the subclasses. I suppose it'd be reasonable to return -responseData for AFHTTPRequestOperation itself, when a more specific subclass is not in use.

I'm guessing you're not using a subclass, right? Also, are you still using AFNetworking 1.x?

from afnetworking-synchronous.

Janne-M avatar Janne-M commented on May 18, 2024

Wow, that was fast!
Yup, no need for a subclass.
I'm still on AFNetworking 1.x, I have some legacy code that depends on it.
I'll probably update to AFN 2 when time permits, but I understood that it was som restructuring needed and not jus a recompile... ;-)

from afnetworking-synchronous.

paulmelnikow avatar paulmelnikow commented on May 18, 2024

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 -responseString instead of -responseData, but it seems like -responseData is at least possibly useful, where nil definitely is not.

I'll get this changed tonight. Thanks for the patch!

from afnetworking-synchronous.

Janne-M avatar Janne-M commented on May 18, 2024

You're welcome!
I thank You for providing this excellent category that just blended nicely into my project and solved my synchronous need in no time.
Please make it compatible with AFN2, so I have another reason to myself to make the switch.. :-)

from afnetworking-synchronous.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.