Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> ...ending up in an error block because of a malformed server response is a pain in the ass. Is it really an error if you get a 200 OK response but the body isn't valid JSON?

Yes. Oh goodness, yes it is. Having consistent validation on the networking level means not having sporadic logic scattered throughout models and view controllers.

Your server sent invalid JSON (e.g. sending HTML instead)? AFNetworking just saved you from a crash, or some other undefined, dangerous behavior.

AFNetworking is pedantic because networking is such a wildcard, in terms of performance, consistency, and security.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: