ajax execution error parameter record

error: function (XMLHttpResponse, textStatus, errorThrown){}


A, XMLHttpResponse: http response

  1.XMLHttpRequest.readyState: status code

0 - (uninitialized) has not been called send () method 
1-- (load) has been called send () method, is sending request 
2 - (Loaded) Send () method performs is completed, the entire response has been received 
3 - (interactive) response is being parsed 
4 - (complete) response content analysis is complete, you can call the client

  2.XMLHttpRequest.status: result code

0XX: uninitialized state 
1xx- message alert 
These status codes indicate a provisional response. Before a client receiving a regular response, should be prepared to receive one or more 1xx response.
100 continue. 
101 Switching protocols. 
2xx- success 
Such status codes indicate that the server successfully accepted the client request. 
200- OK. The client request has succeeded.
201- created. 
202- has been accepted. 
203- non-authoritative information. 
204- empty. 
205- Reset content. 
206- part. 
3xx- redirection 
The client browser must take more action to fulfill the request. For example, the browser may have to request a different page on the server or repeat the request through a proxy server.
301 objects have been permanently removed, that is a permanent redirect. 
302 objects have been temporarily moved. 
304- unmodified. 
307- temporary redirect. 
4xx- client error 
Error occurs, the client seems to have problems. For example, a client requests a page that does not exist, the client may not provide valid authentication information. 400 - Bad request.
401 Access Denied. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error code is displayed in the browser, but not displayed in the IIS log:
401.1 - Logon failed. 
401.2 - Logon failed due to server configuration. 
401.3 - due to ACL on resource without authorization. 
401.4 Authorization failed by filter. 
401.5-ISAPI / CGI application authorization failure. 
401.7- Access denied URL authorization policy on the Web server. This error code is specific to IIS6.0.
403 Forbidden: IIS defines a number of different 403 errors that indicate a more specific cause of the error: 
403.1- Execute access forbidden. 
403.2 - Read access forbidden. 
403.3- write access is prohibited. 
403.4 require SSL. 
403.5- requirements SSL128. 
403.6-IP address rejected. 
403.7 - Client certificate required. 
403.8- site access is denied. 
Excessive 403.9- number of users. 
Invalid 403.10- configuration. 
403.11- password change. 
403.12- denied access map. 
403.13- client certificate was revoked. 
403.14- Directory Listing Denied. 
403.15- exceed client access licenses. 
403.16 - Client certificate is untrusted or invalid. 
403.17 Client certificate has expired or is not yet valid. 
403.18- can not perform the requested URL in the current application pool. This error code is specific to IIS6.0.
403.19 not execute CGI applications for the client in this pool. This error code is specific to IIS6.0.
403.20-Passport login fails. This error code is specific to IIS6.0.
404 - not found. 
404.0 - (None) - File or directory not found. 
404.1- Web site not accessible on the requested port. 
404.2-Web service extension lockdown policy prevents this request. 
404.3-MIME map policy prevents this request. 
405 used to access this page HTTP verb is not allowed (method not allowed.) 
406- client browser does not accept the MIME type of the requested page. 
407- require proxy authentication. 
412- Precondition failed. 
413- Request Entity Too Large. 
414- request URI is too long. 
415 Unsupported media types. 
416 The requested range can not be met. 
417- execution failed. 
423- locked error. 
5xx- Server Error 
Since the server encountered an error and could not complete the request. 
500 - Internal server error. 
500.12- Application is busy restarting on the Web server. 
500.13-Web server is too busy. 
500.15- do not allow direct request Global.asa. 
500.16-UNC authorization credentials incorrect. This error code is specific to IIS6.0.
500.18-URL authorization store can not be opened. This error code is specific to IIS6.0.
500.100- internal ASP error. 
501 Header values ​​specify a configuration that is not implemented. 
502-Web server received an invalid response as a gateway or proxy. 
502.1-CGI application timeout. 
502.2-CGI application error. application.
503- service is unavailable. This error code is specific to IIS6.0.
504- Gateway Timeout. 
505-HTTP version is not supported. 
FTP 
1xx- positive initial response 
These status code indicates that an action has started successfully, but the client wants to get another reply before proceeding new command. 
110- restart marker reply. 
120- Service ready in nnn minutes. 
125- Data connection open, transfer starting. 
150 File status okay, about to open data connection. 
2xx- Positive Completion reply 
An action has been completed successfully. The client can execute a new command. 200 Command OK.
202- command is not executed, too many commands on the site. 
211- system status, or system help reply. 
212- directory state. 
213- documents state. 
214- help message. 
215-NAME system type, where, NAME is an official system name from the list AssignedNumbers document. 
220 Service ready for new user requests. 
221- Service closing control connection. If appropriate, please log out.
225- data connection open, transfer is not ongoing. 
226- close the data connection. Requested file operation was successful (e.g., transfer or file abort).
227-enter the passive mode (h1, h2, h3, h4, p1, p2). 
230- user has logged in, proceed. 
250 Requested file correct operation has been completed. 
257- has been created "PATHNAME". 
3xx- Positive Intermediate reply 
The command was successful, but the server needs additional information from the client to complete processing the request. 331 User name okay, need password.
332- need to login. 
350- requested file action pending further information. 
4xx- Transient Negative Completion Reply 
This command is not successful, but the error is temporary. If the client retries the command, it may succeed. 421 Service not available, closing control connection. If the service determines that it must shut down, it sends the response to any command.
425- Can not open data connection. 
426-Connectionclosed;transferaborted. 
450- requested document operation is not performed. File unavailable (eg, file busy).
451- requested action aborted: local error in processing. 
452- requested operation is not performed. Insufficient system memory.
5xx- Permanent Negative Completion Reply 
This command is not successful, the error is permanent. If the client retries the command, the same error occurs again. 500 Syntax error, command is not recognized. This may include errors such as command line too long and the like.
501 Syntax error in the parameters. 
502- command is not executed. 
503- wrong sequence of commands. 
504- command of this parameter is not implemented. 
530- logged in. 
532- store files required account. 
550 requested operation is not performed. File unavailable (eg, file not found, no access).
551- requested action aborted: unknown page type. 
552- requested file operation Aborted: Exceeded storage allocation (or data set to the current directory). 
553- requested operation is not performed. File name not allowed.
Common FTP status codes and their causes 
150-FTP uses two ports: 21 for sending commands, 20 for transmitting data. Status code 150 indicates that the server opens a new connection on port 20, send some data.
226- command opens a data connection to perform an operation, such as transferring files on port 20. This operation completed successfully, the data connection is closed.
230- client sends the correct password, displays the status code. It indicates that the user has successfully logged.
331- client sends the user name, displaying the status code. Username Regardless of whether the system provides a valid account, it will show the status code.
426- command opens a data connection to perform an operation, but the operation has been canceled, the data connection is closed. 
530- This status code indicates that the user can not log on because the user name and password combination is not valid. If you use a user login account, you may type the wrong user name or password, or may choose to only allow anonymous access. If you log in using the anonymous account, IIS configuration may refuse anonymous access.
550 command is not executed because the specified file is not available. For example, to GET the file does not exist, or trying to PUT the file you do not have write permissions to the directory.

Two, textStatus: return status string type

"Timeout" (timeout), "error" (error), "abort" (abort), "parsererror" (parse error), and may return a null value.

Three, errorThrown: error messages returned

Throw an error message indicating that the server returned, if the HTTP error is generated, the returned information is the error message HTTP status code corresponding, Not Found, such as 404, 500 error Internal Server Error.

 On this blog is reserved for a personal record, the original blog: https://blog.csdn.net/java_zhangshuai/article/details/80274510

Guess you like

Origin www.cnblogs.com/ttzsqwq/p/11081847.html