ASIHttpRequest: requestDidFinishSelector vs. requestDidFailSelector

Before moving to ASIHttpRequest source code:

From the documentation ( http://allseeing-i.com/ASIHTTPRequest/How-to-use ) from ASIHttpRequest it is not clear to me when ASIHttpRequest calls requestDidFinishSelector or requestDidFailSelector.

When is the request aborted?

Is it correct to assume that whenever the server responds (with the appropriate HTTP status code, be it 1xx, 2xx, 3xx, 4xx or 5xx, the request is considered successful, and therefore the DidFinishSelector request is applied? Is the "failure" that the server cannot to be achieved?

As I type this, this seems to be the most logical answer ... anyway.

+3
source share
2

- , HTTP. ASIHTTPRequest responseStatusCode.

URL- , . requestDidFailSelector ( ) .

+1

, ASIHTTPRequest HTTP ( ), (: 404) requestDidFinishSelector.

int statusCode = [request responseStatusCode];
NSString *statusMessage = [request responseStatusMessage];

requestDidFailSelector , (-, , ,...)

+2

Source: https://habr.com/ru/post/1789636/


All Articles