What is the HTTP protocol? What are the commonly used status codes?

What is the HTTP protocol? What are the commonly used status codes?

1. Introduction to HTTP

The HTTP protocol is the abbreviation of Hyper Text Transfer Protocol (Hyper Text Transfer Protocol), which is a transfer protocol used to transfer hypertext from a World Wide Web (WWW: World Wide Web) server to a local browser.

HTTP is a communication protocol based on TCP/IP to transfer data (HTML files, picture files, query results, etc.).

HTTP is an object-oriented protocol belonging to the application layer. Due to its simple and fast method, it is suitable for distributed hypermedia information systems. It was proposed in 1990, and after several years of use and development, it has been continuously improved and expanded. Currently, the sixth edition of HTTP/1.0 is used in the WWW. The standardization of HTTP/1.1 is in progress, and the HTTP-NG (Next Generation of HTTP) proposal has been put forward.

The HTTP protocol works on a client-server architecture. As an HTTP client, the browser sends all requests to the HTTP server, ie, the WEB server, through the URL. The web server sends response information to the client according to the received request.

2. Main features

1. Simple and fast : When a client requests a service from the server, it only needs to transmit the request method and path. Commonly used request methods are GET, HEAD, and POST. Each method provides a different type of contact between the client and the server. Because the HTTP protocol is simple, the program size of the HTTP server is small, and the communication speed is very fast.

2. Flexible : HTTP allows the transmission of any type of data object. The type being transmitted is marked by Content-Type.

3. No connection : The meaning of no connection is to limit each connection to only process one request. After the server has processed the client's request and received the client's response, it will disconnect. In this way, transmission time can be saved.

4. Stateless : HTTP protocol is a stateless protocol. Statelessness means that the protocol has no memory capacity for transaction processing. The lack of status means that if the previous information is needed for subsequent processing, it must be retransmitted, which may result in an increase in the amount of data transmitted per connection. On the other hand, when the server does not need previous information, its response is faster.
5. Support B/S and C/S mode .

3. HTTP URL

HTTP uses Uniform Resource Identifiers (URI) to transmit data and establish connections. URL is a special type of URI that contains enough information to find a certain resource

 

URL, the full name is UniformResourceLocator, is called Uniform Resource Locator in Chinese, and is the address used to identify a resource on the Internet. Take the following URL as an example to introduce the components of a common URL:

 

http://www.aspxfans.com:8080/news/index.asp?boardID=5&ID=24618&page=1#name

 

As can be seen from the above URL, a complete URL includes the following parts:
1. Protocol part : The protocol part of the URL is "http:", which means that the web page uses the HTTP protocol. There are many protocols that can be used in the Internet, such as HTTP, FTP, etc. In this case, the HTTP protocol is used. "//" after "HTTP" is the separator

 

2. Domain name part : The domain name part of the URL is "www.aspxfans.com". In a URL, you can also use the IP address as a domain name

 

3. Port part : The port is followed by the domain name, and ":" is used as a separator between the domain name and the port. The port is not a required part of a URL. If the port part is omitted, the default port will be used

 

4. Virtual directory part : from the first "/" after the domain name to the last "/", it is the virtual directory part. The virtual directory is also not a required part of a URL. The virtual directory in this example is "/news/"

 

5. File name part : from the last "/" after the domain name to "?", it is the file name part, if there is no "?", it starts from the last "/" after the domain name and ends with "#" , Is the file part, if there is no "?" and "#", then from the last "/" after the domain name to the end, it is the file name part. The file name in this example is "index.asp". The file name part is not a required part of a URL, if this part is omitted, the default file name will be used

 

6. Anchor part : From "#" to the end, it is the anchor part. The anchor part in this example is "name". The anchor part is not a required part of a URL

 

7. Parameter part : the part from "?" to "#" is the parameter part, also known as the search part and the query part. The parameter part in this example is "boardID=5&ID=24618&page=1". The parameter can allow multiple parameters, and use "&" as a separator between the parameter and the parameter.

 

4. the difference between URI and URL

URI is a uniform resource identifier, which is used to uniquely identify a resource.

 

Every resource available on the Web, such as HTML documents, images, video clips, programs, etc., is a URI to locate a
URI generally composed of three parts:
The naming mechanism for accessing resources
The host name of the resource The name of the
resource , Represented by the path, with emphasis on resources.

 

URL is a uniform resource locator, which is a specific URI, that is, URL can be used to identify a resource, and it also specifies how to locate the resource.

 

URL is a string used to describe information resources on the Internet, mainly used in various WWW client programs and server programs, especially the famous Mosaic.
The URL can be used to describe various information resources in a unified format, including files, server addresses, and directories. URL generally consists of three parts:
Protocol (or called service mode)
Host IP address (sometimes including port number) where the
resource is stored Specific address of the host resource. Such as directory and file name, etc.

 

URN, uniform resource name, is to identify resources by name, such as mailto:java-net@java.sun.com.

 

URI is an abstract, high-level concept that defines uniform resource identification, while URL and URN are specific resource identification methods. Both URL and URN are a kind of URI. Generally speaking, every URL is a URI, but not every URI is a URL. This is because URI also includes a subclass, the Uniform Resource Name (URN), which names resources but does not specify how to locate the resources. The mailto, news, and isbn URIs above are all examples of URN.

 

In Java URI, a URI instance can represent absolute or relative, as long as it conforms to the URI syntax rules. The URL class not only conforms to semantics, but also contains information to locate the resource, so it cannot be relative.
In the Java class library, the URI class does not contain any methods for accessing resources, and its only role is to parse.
Conversely, the URL class can open a stream to the resource.

 

5. HTTP request message Request

The request message that the client sends an HTTP request to the server includes the following format:

 

It consists of four parts: request line, header, blank line and request data.
Example of Get request, using the request captured by Charles:

 


GET/562f25980001b1b106000338.jpg HTTP/1.1
Host img.mukewang.com
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
Accept image/webp,image/*,*/*;q=0.8
Referer http://www.imooc.com/
Accept-Encoding gzip, deflate, sdch
Accept-Language zh-CN,zh;q=0.8
The first part: request line, used to indicate the type of request, the resource to be accessed and the HTTP version used.

GET indicates that the request type is GET, [/562f25980001b1b106000338.jpg] is the resource to be accessed, and the last part of the line indicates that the HTTP 1.1 version is used.

The second part: the request header, the part immediately after the request line (that is, the first line), used to describe the additional information to be used by the server

From the second line is the request header, HOST will indicate the destination of the request. User-Agent, server-side and client-side scripts can access it, it is an important basis for the browser type detection logic. This information is determined by your browser To define it, and automatically send in every request, etc.

The third part: blank line, the blank line after the request header is required

Even if the request data in the fourth part is empty, there must be an empty row.

The fourth part: The request data is also called the subject, and any other data can be added.

The request data for this example is empty.

 

POST request example, using the request captured by Charles:

POST/HTTP1.1
Host: www.wrox.com
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Content-Type:application/x-www-form-urlencoded
Content-Length: 40
Connection: Keep-Alive

name=Professional%20Ajax&publisher=Wiley


 

The first part : request line, the first line clearly is the post request, and http1.1 version. The second part : request header, the second to sixth lines. The third part : blank line, blank line on the seventh line. The fourth part : request data, the eighth line.


 

 

 

6. HTTP response message Response

The HTTP response also consists of four parts: status line, message header, blank line and response body .

 

The first part: The status line is composed of three parts: HTTP protocol version number, status code, and status message.

 

The first line is the status line, (HTTP/1.1) indicates that the HTTP version is 1.1, the status code is 200, and the status message is (ok)

 

The second part: message header, used to explain some additional information to be used by the client

 

The second and third lines are the message header,
Date: the date and time when the response was generated; Content-Type: HTML (text/html) with MIME type specified, and the encoding type is UTF-8

 

The third part: blank line, the blank line after the message header is required

 

The fourth part: response body, the text information that the server returns to the client.

 

The html part after the blank line is the response body.

 

7. HTTP request method

According to the HTTP standard, HTTP requests can use multiple request methods.
HTTP1.0 defines three request methods: GET, POST and HEAD methods.
HTTP1.1 adds five new request methods: OPTIONS, PUT, DELETE, TRACE and CONNECT methods.


 GET requests the specified page information and returns the entity body.
 HEAD is similar to a get request, except that there is no specific content in the returned response, which is used to get the header
 POST submits data to a specified resource for processing request (such as submitting a form or uploading a file). The data is contained in the request body. POST requests may result in the creation of new resources and/or the modification of existing resources.
 PUT The data transmitted from the client to the server replaces the content of the specified document.
 DELETE requests the server to delete the specified page.
 The CONNECT HTTP/1.1 protocol is reserved for proxy servers that can change the connection to a pipe mode.
 OPTIONS allows the client to view the performance of the server.
 TRACE echoes the request received by the server, which is mainly used for testing or diagnosis.

 

8. HTTP working principle

The HTTP protocol defines how a Web client requests a Web page from a Web server, and how the server transmits the Web page to the client. The HTTP protocol uses a request/response model. The client sends a request message to the server. The request message contains the requested method, URL, protocol version, request header, and request data. The server responds with a status line. The content of the response includes the protocol version, success or error code, server information, response headers, and response data.

 

The following are the steps for HTTP request/response:

 

1. The client connects to the Web server

 

An HTTP client, usually a browser, establishes a TCP socket connection with the HTTP port of the Web server (80 by default). For example, www.oakcms.cn.

 

2. Send HTTP request

 

Through the TCP socket, the client sends a text request message to the Web server. A request message consists of 4 parts: request line, request header, blank line and request data.

 

3. The server accepts the request and returns an HTTP response

 

The web server parses the request and locates the requested resource. The server writes a copy of the resource to the TCP socket, which is read by the client. A response consists of 4 parts: status line, response header, blank line and response data.

 

4. Release the connection TCP connection

 

If the connection mode is close, the server actively closes the TCP connection , and the client passively closes the connection and releases the TCP connection ; if the connection mode is keepalive, the connection will remain for a period of time, during which time it can continue to receive requests;

 

5. The client browser parses the HTML content

 

The client browser first parses the status line and looks at the status code indicating whether the request was successful. Then each response header is parsed, and the response header informs that the following is a few-byte HTML document and the character set of the document. The client browser reads the response data HTML, formats it according to the syntax of HTML, and displays it in the browser window.

 

For example: Type the URL in the address bar of the browser and press Enter, it will go through the following process:

 

1. The browser requests the DNS server to resolve the IP address corresponding to the domain name in the URL;

 

2. After the IP address is resolved, establish a TCP connection with the server based on the IP address and the default port 80 ;

 

3. The browser sends an HTTP request to read the file (the file corresponding to the part of the domain name in the URL), and the request message is sent to the server as  the third message of the TCP three-way handshake ;

 

4. The server responds to the browser request and sends the corresponding html text to the browser;

 

5. Release the  TCP connection ;

 

6. The browser will display the html text and display the content;

9. HTTP status code

Status codestatus informationmeaning
100 Continue The initial request has been accepted, and the client should continue to send the rest of the request. (New in HTTP 1.1)
101 Switching Protocols The server will comply with the client's request to switch to another protocol (HTTP 1.1 new)
200 OK Everything is normal, and the response documents for GET and POST requests follow.
201 Created The server has created the document, and its URL is given in the Location header.
202 Accepted The request has been accepted, but processing has not yet been completed.
203 Non-Authoritative Information The document has been returned normally, but some response headers may be incorrect because a copy of the document is used (new in HTTP 1.1).
204 No Content There is no new document, the browser should continue to display the original document. If the user refreshes the page regularly, and the servlet can determine that the user document is new enough, this status code is useful.
205 Reset Content There is no new content, but the browser should reset the content it displays. Used to force the browser to clear the form input (new in HTTP 1.1).
206 Partial Content The client sends a GET request with a Range header, and the server completes it (HTTP 1.1 new).
300 Multiple Choices The document requested by the customer can be found in multiple locations, which are already listed in the returned document. If the server wants to make a preference, it should be indicated in the Location response header.
301 Moved Permanently The document requested by the client is elsewhere, the new URL is given in the Location header, and the browser should automatically access the new URL.
302 Found Similar to 301, but the new URL should be seen as a temporary replacement, not a permanent one. Note that the corresponding status information in HTTP1.0 is "Moved Temporatily". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code can sometimes be replaced with 301. For example, if the browser requests http://host/~user by mistake (missing the trailing slash), some servers will return 301, and some will return 302. Strictly speaking, we can only assume that the browser will automatically redirect only when the original request is a GET. See 307.
303 See Other Similar to 301/302, the difference is that if the original request is POST, the redirection target document specified by the Location header should be retrieved via GET (HTTP 1.1 new).
304 Not Modified The client has a buffered document and sends a conditional request (generally, the If-Modified-Since header is provided to indicate that the client only wants documents that are newer than the specified date). The server tells the client that the original buffered document can still be used.
305 Use Proxy The document requested by the client should be retrieved through the proxy server specified in the Location header (HTTP 1.1 new).
307 Temporary Redirect Same as 302 (Found). Many browsers will erroneously respond to the 302 response to redirect, even if the original request was a POST, even though it can actually only be redirected when the response to the POST request is 303. For this reason, HTTP 1.1 has added 307 to more clearly distinguish several status codes: when a 303 response appears, the browser can follow redirected GET and POST requests; if it is a 307 response, the browser can only follow Redirection to GET request. (New in HTTP 1.1)
400 Bad Request The request has a syntax error.
401 Unauthorized The customer tried to access a password-protected page without authorization. The response will contain a WWW-Authenticate header, and the browser will display the user name/password dialog box accordingly, and then send the request again after filling in the appropriate Authorization header.
403 Forbidden The resource is unavailable. The server understands the client's request, but refuses to process it. It is usually caused by the permission settings of files or directories on the server.
404 Not Found The resource at the specified location could not be found. This is also a commonly used response.
405 Method Not Allowed The request method (GET, POST, HEAD, DELETE, PUT, TRACE, etc.) is not applicable to the specified resource. (New in HTTP 1.1)
406 Not Acceptable The specified resource has been found, but its MIME type is not compatible with the client specified in the Accpet header (HTTP 1.1 new).
407 Proxy Authentication Required Similar to 401, it means that the client must first be authorized by the proxy server. (New in HTTP 1.1)
408 Request Timeout During the waiting time allowed by the server, the client has not sent any requests. The customer can repeat the same request later. (New in HTTP 1.1)
409 Conflict Usually related to PUT requests. Because the request conflicts with the current state of the resource, the request cannot be successful. (New in HTTP 1.1)
410 Gone The requested document is no longer available, and the server does not know which address to redirect to. The difference between it and 404 is that returning 407 means that the document has permanently left the specified location, while 404 means that the document is unavailable for unknown reasons. (New in HTTP 1.1)
411 Length Required The server cannot process the request unless the client sends a Content-Length header. (New in HTTP 1.1)
412 Precondition Failed Some preconditions specified in the request header failed (new in HTTP 1.1).
413 Request Entity Too Large The size of the target document exceeds the size that the server is currently willing to handle. If the server thinks it can process the request later, it should provide a Retry-After header (new in HTTP 1.1).
414 Request URI Too Long The URI is too long (new in HTTP 1.1).
416 Requested Range Not Satisfiable The server cannot satisfy the Range header specified by the client in the request. (New in HTTP 1.1)
500 Internal Server Error The server encountered an unexpected situation and could not complete the client's request.
501 Not Implemented The server does not support the function required to implement the request. For example, the client sends a PUT request that the server does not support.
502 Bad Gateway When the server is acting as a gateway or proxy, it visits the next server in order to complete the request, but the server returns an illegal response.
503 Service Unavailable The server failed to respond due to maintenance or heavy load. For example, a servlet may return 503 when the database connection pool is full. The server can provide a Retry-After header when it returns 503.
504 Gateway Timeout Used by the server as a proxy or gateway, it means that it cannot get a response from the remote server in time. (New in HTTP 1.1)
505 HTTP Version Not Supported The server does not support the HTTP version specified in the request. (New in HTTP 1.1)

10. System.Net.HttpStatusCode

  1  namespace System.Net
   2  {
   3      //
  4      //Summary:
   5      //     Contains the value of the status code defined for HTTP. 
  6      public  enum HttpStatusCode
   7      {
   8          //
  9          //Abstract:
 10          //     Equivalent to HTTP status 100. System.Net.HttpStatusCode.Continue indicates that the client can continue its request. 
11          Continue = 100 ,
 12          //
13          //Summary:
 14          //     Equivalent to HTTP status is 101. System.Net.HttpStatusCode.SwitchingProtocols indicates the protocol version or protocol being changed. 
15         SwitchingProtocols = 101 ,
 16          //
17          //Abstract:
 18          //     Equivalent to HTTP status 200. System.Net.HttpStatusCode.OK indicates that the request was successful and the requested information is included in the response. This is the most common status code to receive. 
19          OK = 200 ,
 20          //
21          //Summary:
 22          //     Equivalent to HTTP status 201. System.Net.HttpStatusCode.Created indicates that the request caused a new resource to be created before the response has been sent. 
23          Created = 201 ,
 24          //
25          //Summary:
 26          //     Equivalent to HTTP status 202. System.Net.HttpStatusCode.Accepted indicates that the request has been accepted for further processing. 
27         Accepted = 202 ,
 28          //
29          //Abstract:
 30          //     Equivalent to HTTP status 203. System.Net.HttpStatusCode.NonAuthoritativeInformation indicates that the returned meta-information comes from a cached copy of the original server instead of, so it may be incorrect. 
31          NonAuthoritativeInformation = 203 ,
 32          //
33          //Abstract:
 34          //     Equivalent to HTTP status 204. System.Net.HttpStatusCode.NoContent indicates that the request has been successfully processed and the response is intentionally left blank. 
35          NoContent = 204 ,
 36          //
37          //Summary:
 38          //     Equivalent to HTTP status 205. System.Net.HttpStatusCode.ResetContent indicates that the client should reset (rather than reload) the current resource. 
39          ResetContent = 205 ,
 40          //
41          //Abstract:
 42          //     Equivalent to HTTP 206 status. System.Net.HttpStatusCode.PartialContent indicates that the response according to the request of the GET request including the byte range is a partial response. 
43          PartialContent = 206 ,
 44          //
45          //Abstract:
 46          //     Equivalent to HTTP status 300. System.Net.HttpStatusCode.MultipleChoices indicates that the required information has multiple representations. The default action is to treat this status as a redirect and follow the content of the location header associated with this response. 
47          MultipleChoices = 300 ,
 48          //
49         //Abstract:
 50          //     Equivalent to HTTP status 300. System.Net.HttpStatusCode.Ambiguous indicates that the required information has multiple representations. The default action is to treat this status as a redirect and follow the content of the location header associated with this response. 
51          Ambiguous = 300 ,
 52          //
53          //Abstract:
 54          //     Equivalent to HTTP status 301. System.Net.HttpStatusCode.MovedPermanently indicates that the required information has been moved to the 55          //     URI 
specified in the header
 . The default action when receiving this status is to follow the location header associated with the response. 56          MovedPermanently = 301 ,
 57          //
58          //Summary:
 59          //     Equivalent to HTTP status 301. System.Net.HttpStatusCode.Moved indicates that the required information has been moved to the URI specified in the location header. The default action when receiving this status is to follow the location header associated with the response.
60          //     When the original request method is POST, the redirected request will use the GET method. 
61          Moved = 301 ,
 62          //
63          //Summary:
 64          //     Equivalent to HTTP status 302. System.Net.HttpStatusCode.Found indicates that the required information is located at the URI specified in the header. The default action when this status is received is to follow the location header associated with the response.
65          //     When the original request method is POST, the redirected request will use the GET method. 
66          Found = 302 ,
 67          //
68          //Summary:
 69          //     Equivalent to HTTP status 302. System.Net.HttpStatusCode.Redirect indicates where the required information is located at the URI specified in the header. The default action when this status is received is to follow the location header associated with the response.
70          //     When the original request method is POST, the redirected request will use the GET method. 
71          Redirect = 302 ,
 72          //
73          //Abstract:
 74          //     Equivalent to HTTP status 303. System.Net.HttpStatusCode.SeeOther automatically redirects the client to the location header specified in the 75          //     URI 
as the result of the announcement
 . The request for the resource of the specified location header will be executed with GET. 76          SeeOther = 303 ,
 77          //
78          //Summary:
 79          //     Equivalent to HTTP status 303. System.Net.HttpStatusCode.RedirectMethod automatically redirects the client to the location where the header specifies the 80          //     URI 
as the result of the announcement
 . The request for the resource of the specified location header will be executed with GET. 81          RedirectMethod = 303 ,
 82          //
83          //Summary:
 84          //     Equivalent to HTTP status 304. System.Net.HttpStatusCode.NotModified indicates that the client's cached copy is up to date. The content of the resource will not be transferred. 
85          NotModified = 304 ,
 86          //
87          //Abstract:
 88          //     Equivalent to HTTP status 305. System.Net.HttpStatusCode.UseProxy indicates that the request should use the proxy server of the uri specified in the location header. 
89          UseProxy = 305 ,
90          //
91          //Abstract:
 92          //     Equivalent to HTTP status 306. System.Net.HttpStatusCode.Unused is an extension recommended by the HTTP/1.1 specification that is not fully specified. 
93          Unused = 306 ,
 94          //
95          //Abstract:
 96          //     Equivalent to HTTP status 307. It indicates that the requested information is located System.Net.HttpStatusCode.TemporaryRedirect position specified in the header
 97          //     the URI. The default action when this status is received is to follow the location header associated with the response. When the original request method is POST, the redirected request will also use the POST method. 
98          TemporaryRedirect = 307 ,
 99          //
100          //Summary:
 101          //     Equivalent to HTTP status 307. System.Net.HttpStatusCode.RedirectKeepVerb indicates that the request information is located at the 102          //     URI 
specified in the header
 . The default action when this status is received is to follow the location header associated with the response. When the original request method is POST, the redirected request will also use the POST method. 103          RedirectKeepVerb = 307 ,
 104          //
105          //Abstract:
 106          //     Equivalent to HTTP status 400. System.Net.HttpStatusCode.BadRequest indicates that the request cannot be understood by the server. System.Net.HttpStatusCode.BadRequest
 107          //     If no other errors apply, or if the specific error is unknown or does not have its own error code sent. 
108          BadRequest = 400 ,
 109          //
110          //Abstract:
 111          //     Equivalent to HTTP status 401. System.Net.HttpStatusCode.Unauthorized indicates that the requested resource requires authentication. Www-authenticate
 112          //     The header contains detailed information on how to perform authentication. 
113          Unauthorized = 401 ,
 114          //
115          //Abstract:
 116          //     Equivalent to HTTP status 402. System.Net.HttpStatusCode.PaymentRequired has been reserved for future use. 
117          PaymentRequired = 402 ,
 118          //
119          //Abstract:
 120          //     Equivalent to HTTP status 403. System.Net.HttpStatusCode.Forbidden indicates that the server refused to complete the request. 
121          Forbidden = 403 ,
 122          //
123          //Abstract:
 124          //     Equivalent to HTTP status 404. System.Net.HttpStatusCode.NotFound indicates that the requested resource does not exist on the server. 
125          NotFound = 404 ,
 126          //
127          //Abstract:
 128          //     Equivalent to HTTP status 405. System.Net.HttpStatusCode.MethodNotAllowed indicates the request method (POST or GET)
 129          //     The requested resource is not allowed. 
130          MethodNotAllowed = 405 ,
 131          //
132          //Abstract:
 133          //     Equivalent to HTTP status 406. System.Net.HttpStatusCode.NotAcceptable indicates that the client has specified the Accept header, and it will not accept any available resource representation. 
134         NotAcceptable = 406 ,
 //     Equivalent to HTTP status 409. System.Net.HttpStatusCode.Conflict indicates that the request may not be executed due to a conflict on the server. 147          Conflict = 409 414 ,
 169 //     Equivalent to HTTP status 417. System.Net.HttpStatusCode.ExpectationFailed indicates that the Expect 180 //     given in the header cannot be met by the server
 . 500 ,
 191 //192 //Abstract:
 193          ServiceUnavailable = 503 ,
 203 //204 //Abstract:
 205 // 135          //
136          //Abstract:
 137          //     Equivalent to HTTP status 407. System.Net.HttpStatusCode.ProxyAuthenticationRequired indicates that the requested proxy requires authentication.
138          //     Proxy server authentication header contains detailed information on how to perform authentication. 
139          ProxyAuthenticationRequired = 407 ,
 140          //
141          //Abstract:
 142          //     Equivalent to HTTP status 408. System.Net.HttpStatusCode.RequestTimeout indicates that the client's server did not send a request within the expected time. 
143          RequestTimeout = 408 ,
 144          //
145          //Abstract:
 146         
 ,
 148          //
149          //Abstract:
 150          //     Equivalent to HTTP status 410. System.Net.HttpStatusCode.Gone indicates that the requested resource is no longer available. 
151          Gone = 410 ,
 152          //
153          //Abstract:
 154          //     Equivalent to HTTP status 411. System.Net.HttpStatusCode.LengthRequired indicates that the required content length header is missing. 
155          LengthRequired = 411 ,
 156          //
157          //Summary:
 158          //     Equivalent to HTTP status 412. System.Net.HttpStatusCode.PreconditionFailed indicates that the request failed because the conditions set by this request cannot be executed.
159          //     Use condition request header, if match item, such as setting condition no-If-match, or if-modify-from. 
160          PreconditionFailed = 412 ,
 161          //
162          //Abstract:
 163          //     Equivalent to HTTP status 413. System.Net.HttpStatusCode.RequestEntityTooLarge indicates that the request is too large for the server to handle. 
164          RequestEntityTooLarge = 413 ,
 165          //
166          //Abstract:
 167          //     Equivalent to HTTP status 414. System.Net.HttpStatusCode.RequestUriTooLong indicates that the URI is too long. 
168          RequestUriTooLong =         
 170          //Abstract:
 171          //     Equivalent to HTTP status 415. System.Net.HttpStatusCode.UnsupportedMediaType indicates that the request is of an unsupported type. 
172          UnsupportedMediaType = 415 ,
 173          //
174          //Abstract:
 175          //     Equivalent to HTTP 416 status. System.Net.HttpStatusCode.RequestedRangeNotSatisfiable indicates that the range of data requested from the resource cannot be returned, or because the start of the range is then the beginning of the resource or the end of the range is at the end of the resource. 
176          RequestedRangeNotSatisfiable = 416 ,
 177          //
178          //Summary:
 179          //         
181          ExpectationFailed = 417 ,
 182          //
183          //Abstract:
 184          //     Equivalent to HTTP status 426. System.Net.HttpStatusCode.UpgradeRequired indicates that the client should switch to a different protocol, such as
 185          //     TLS/1.0. 
186          UpgradeRequired = 426 ,
 187          //
188          //Abstract:
 189          //     Equivalent to HTTP status 500. System.Net.HttpStatusCode.InternalServerError indicates that a general error has occurred on the server. 
190          InternalServerError =         
                  //     Equivalent to HTTP status 501. System.Net.HttpStatusCode.NotImplemented indicates that the server does not support the requested function. 
194          NotImplemented = 501 ,
 195          //
196          //Abstract:
 197          //     Equivalent to HTTP status 502. System.Net.HttpStatusCode.BadGateway indicates that the intermediate proxy server received an error response from another proxy or origin server. 
198          BadGateway = 502 ,
 199          //
200          //Abstract:
 201          //     Equivalent to HTTP status 503. System.Net.HttpStatusCode.ServiceUnavailable indicates that the server is temporarily unavailable, usually due to high load or maintenance. 
202         
                       Equivalent to HTTP status 504. System.Net.HttpStatusCode.GatewayTimeout indicates that the intermediate proxy server has timed out while waiting for a response from another proxy or origin server.
206          GatewayTimeout = 504 ,
 207          //
208          //Abstract:
 209          //     Equivalent to HTTP status 505. System.Net.HttpStatusCode.HttpVersionNotSupported indicates that the server does not support the requested
 210          //     HTTP version. 
211          HttpVersionNotSupported = 505 
212      }
 213 }