I know this question has been asked a lot of time and a lot of suggestions exist on the net. But i am still not able to conclude what is the right way.
After ASIHTTPRequest
becoming obsolete, i think it is not advisable to use any third party libraries(though AFNetworking
is really good), hence i am trying to build a one on my own.
- I want to have following features in it Asynchronous concurrent connections
- Support of delegate methods to track connection progress
- Support of doing authentication
- Ability to cancel any connection and restart
I did came across multiple recipes using NSOperation
, GCD, NSBlockOperation
, NSRunLoop
, etc. Also i did check the code of AFURLConnectionOperation
but it is hell lot of a code which i think can be over kill in many situations.
Can anyone suggest me the optimum and minimalist way to achieve my requirements?