AFDownloadRequestOperation icon indicating copy to clipboard operation
AFDownloadRequestOperation copied to clipboard

Validating response

Open beniciojunior opened this issue 11 years ago • 1 comments

I'm using AFDownloadRequestOperation on my project, but when it receives 416 HTTP status (Requested Range Not Satisfiable), the success block is being called. So I created this fix: every time responseObject is accessed, it validates the response using the (default) responseSerializer, which checks acceptable HTTP status codes.

Adding to that, I removed + acceptableStatusCodes method that is not called on AFNetworking 2.0.

I hope this helps.

beniciojunior avatar Apr 28 '14 18:04 beniciojunior

I had a similar issue (getting 403 from the server) and this fixed it.

So, thanks @beniciojunior :+1:

brunokoga avatar Sep 26 '14 18:09 brunokoga