var getxmlhttprequest = function () { try{ ///Mainstream browser provides XMLHttpRequest object return new XMLHttpRequest (); } catch (E) { ///low version of IE browser does not provide XMLHttpRequest object, IE6 below //So must use the specific implementation of IE browser ActiveXObject return new ActiveXObject ("Microsoft.XMLHTTP");} ; var xhr = Getxmlhttprequest ();//readyState 0=> initialize 1=> load 2=> load complete 3=> parse 4=> finish//Console.
() method has been called and a request is being sent.2-(Loading completed) The send () method is executed completely and all response content has been received3-(interaction) parse the response content4-(complete) The response content has been parsed and can be called on the client
3. data: "{}". If the data is empty, you must pass "{}". Otherwise, the returned data is in xml format. The system prompts parsererror.
4. parsererror exceptions are also related to the Header type. And encoding hea
Successful status code:200– server successfully returned to Web page304– not modifiedFailed status code:404– The requested page does not exist503– Server is temporarily unavailable500– Server Internal ErrorThe following is not very common, remember that the above are OK, there are bugs and then addThe other
HTTP Status CodeCommon Status Codes:Http:status 200– Server successfully returned to Web pageHttp:status 404– The requested page does not existHttp:status 503– Service Not availableDetailedDescription: Http:status 1xx (Temporary response) (continued)----101 (Switchover protocol), the requestor has asked the server to switch protocols, the server has confirmed
HTTP status code parsing and http status Parsing
Reference: http://tool.oschina.net/commons? Type = 5
Status Code
Description
100
The client should continue sending requests. This temporary response is used to notify the client that some of i
"ajax.readystate" to getStatus refers to the HTTP header information code returned by the HTTP protocol based on the information submitted, regardless of whether or not Ajax access was successful, using "Ajax.status" to obtainGeneral understanding: It is simple to understand that State represents a whole. The status is the small state below the big one.2. What is readystateReadyState is a property of the X
varGetxmlhttprequest =function () { Try{ //XMLHttpRequest objects are available in mainstream browsers return NewXMLHttpRequest (); }Catch(e) {//The lower version of IE does not provide XMLHttpRequest objects, IE6 the following //so you must use the specific implementation of IE browser ActiveXObject return NewActiveXObject ("Microsoft.XMLHTTP"); }};varXHR =getxmlhttprequest ();//readyState 0=> initialization 1=> loading 2=> loading complete 3=> parsing 4=> complet
action. Retry after performing the appropriate action
500 Internal server error. An Internal server error occurs.
501 Server does not support the functionality required to fulfill the request. the Server does not support the request Function
502 Error response received ed from gateway. Receive Error response from gateway
503 Temporarily overloaded. Overload
504 Timed out waiting for gateway. Request to be disconnected while waiting for gateway
505 HTTP version not supported. HTTP version not su
Android http code response code status code, androidcode
Some common status codes are:
200-the server returns the webpage successfully
404-the requested webpage does not exist
503-server timeout
The complete list of HTTP status
Tag: Byte customer is required to be locked conditional decomposition function according to status code
Status Code
meaning
100
The client should continue to send the request. This temporary response is used to inform the client that some of its requests have been received by the s
failed"); E.printstackTrace (); }
The status code can be obtained by Uconnection.getresponsecode (). And then determine if the site exists. Here's what the different status codes mean.
HTTP status Return code 1XX (temporary response)
A
The HTTP status Code (response code) is used to indicate whether the HTTP request has completed successfully. The HTTP response type is divided into five categories: message response, successful response, redirect, client error, server-side error.The following table lists all the HTTP status codes and what they mean:
Http response status code (transfer) and response code
Http status return code 1xx (temporary response)Status Code indicating a temporary response and requiring the requester to continu
The HTTP status code is a 3-bit numeric code that represents the HTTP response status of the Web server. It is defined by the RFC 2616 specification and is extended by RFC 2518, RFC 2817, RFC 2295, RFC 2774, RFC 4918, and other specifications.1xx (Temporary response)A status
We often encounter 404, 500, 302 and other hints, what do they mean? In addition to these common status codes, what are some of the status codes that we have not encountered but are likely to appear? Here I made a summary, share with you.
HTTP Status Code Summary description--------------------------------------------
These status codes represent a temporary response. The client should be prepared to receive one or more 1xx responses before receiving a regular response.100-Continue.101-Switch protocol.2XX-SuccessThis type of status code indicates that the server successfully accepted the client request.200-OK. The client request was
The status code is recorded in the IIS log and may also be displayed in a Web browser or FTP client. The status code can indicate whether a specific request has been successful, and can also reveal the exact cause of the request failure.
More information
Location of log files
In the default state, IIS places its log fi
response. setstatus (204), because the latter is hard to understand and can easily cause errors. However, you should note that the server allows slight changes to the message, while the client only pays attention to the numeric value of the status code. Therefore, the server may only return HTTP/1.1 200 instead of HTTP/1.1 200 OK. 100 (continue/continue)If the server receives a request with a header conta
response. setStatus (response. SC _NO_CONTENT) instead of response. setStatus (204), because the latter is hard to understand and can easily cause errors. However, you should note that the server allows slight changes to the message, while the client only pays attention to the numeric value of the status code. Therefore, the server may only return HTTP/1.1 200 instead of HTTP/1.1 200 OK.
100 (Continue/Cont
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.