Success with an AJAX status code <400?

It basically boils down to whether there is any case where it would be bad for me to call the success callback function on status codes up to 400?

Looking at the list of status codes for HTTP , I don’t think it will, but I want to make sure. I don’t think that I will get 1XX level codes, because they look like most of them come back before processing the full request and readyState === 4(I'm not interested in IE 7 122). And I want to return success again in status codes 302 and 304. So, status < 400an acceptable way to catch all this?

+5
source share
2 answers

@sarnold, XMLHttpRequest :

HTTP ( 301, 302, 303 307), ( ). ( 401) .

, , , 2XX 3XX . , , , status < 400 .

+1

A 301 , HTTP URL-. ?

+1
source

All Articles