ios - Detect Time Out Error With AFNetworking -



ios - Detect Time Out Error With AFNetworking -

i utilize afnetworking retrieve info web service every thing work perfectly, want observe time out error. used code in failure block of request don't work

failure:^(afhttprequestoperation *operation, nserror *error) { if ([operation.response statuscode] == 408) { //time out error here } }];

the code 408 normaly time out error

since afnetworking build on top on nsulconnection/nsulrsession can nsurlerrortimedout check if error timeout error:

failure:^(afhttprequestoperation *operation, nserror *error) { if (error.code == nsurlerrortimedout) { //time out error here } }];

you checking http status code, since connection timed out there not statuscode.

ios objective-c timeout afnetworking

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -