A,HTTP profile 

HTTP is short for Hyper Text Transfer Protocol. It is used to Transfer hypertext from the World Wide Web server to the local browser.

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

HTTP is an object-oriented protocol belonging to the application layer. Because of its simple and fast way, it is suitable for distributed hypermedia information system. It was put forward in 1990. After several years of use and development, it has been constantly improved and expanded. Currently the sixth version of HTTP/1.0 is used in the WWW. The standardization of HTTP/1.1 is under way, and the proposal of HTTP-NG(Next Generation of HTTP) has been put forward.

The HTTP protocol works on a client-server architecture. As the HTTP client, the browser sends all requests to the HTTP server, namely the WEB server, through the URL. The Web server sends response information to the client based on the received request.

Two, the main characteristics

1, simple and fast: when customers request service to the server, only need to transmit the request method and path. The commonly used request methods are GET, HEAD and POST. Each method specifies a different type of contact between the client and the server. Because HTTP protocol is simple, the HTTP server program size is small, so the communication speed is very fast.

2. Flexibility: HTTP allows the transfer of data objects of any type. The Type being transferred is marked by content-Type.

3. Connectionless: Connectionless means that only one request can be processed per connection. The server disconnects from the customer after processing the request and receiving the reply from the customer. In this way, transmission time can be saved.

4,statelessHTTP is a stateless protocol. Stateless means that the protocol has no memory for transaction processing. The lack of state means that if the previous information is needed for subsequent processing, it must be retransmitted, which can result in an increase in the amount of data transferred per connection. On the other hand, the server responds faster when it doesn’t need the previous information.

5, support B/S and C/S mode.

Three,The URL of the HTTP 

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

 

URL is an IP address used to identify a resource on the Internet. Take the following URL as an example to describe the components of a common URL:

 

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

 

As you can see from the above URL, a complete URL consists of the following parts:

1. Protocol part: The protocol part of the URL is HTTP:, which indicates that the web page uses THE HTTP protocol. There are many protocols that can be used on the Internet, such as HTTP, FTP, and so on. In this example, HTTP is used. The “//” after “HTTP” is the delimiter

 

2. Domain name: The domain name of the URL is www.aspxfans.com. In a URL, an IP address can also be used as a domain name

 

3. Port: The domain name is followed by the port. The domain name and port are separated by colons (:). The port is not a required part of a URL, and the default port is used if the port part is omitted

 

4. Virtual directory part: The virtual directory part starts from the first “/” after the domain name to the last “/”. The virtual directory is also not a required part of a URL. The virtual directory in this case is “/news/”

 

5. File name: start from the last “/” after the domain name to “?” Is the filename part, if there is no? Is the file part, if there is no “?” And “#”, then from the last “/” after the domain name to the end, is the filename part. In this case, the file name is index.asp. The file name portion is also not a required part of a URL, and if omitted, the default file name is used

 

6. Anchor part: From the “#” to the end, it is the anchor part. The anchor part in this case is “name”. The anchor part is also not a required part of a URL

 

7. Parameter part: From “? The part between the beginning and “#” is the parameter part, also known as the search part, the query part. The parameter part in this example is “boardID=5&ID=24618&page=1”. A parameter can have multiple parameters separated by ampersand (&).

 

Four,The difference between URIs and urls 

A UNIFORM Resource Identifier (URI) is a uniform resource identifier that uniquely identifies a resource.

 

Every resource available on the Web, such as HTML documents, images, video clips, programs, etc., is located by a URI

A URI generally consists of three parts:

① Naming mechanism for accessing resources

② Name of the host that stores resources

③ The name of the resource itself, represented by the path, emphasizes the resource.

 

A URL is a Uniform Resource locator. A URL is a specific URI that can be used to identify a resource and specify how to locate the resource.

 

A URL is a string of characters used to describe information resources on the Internet. It is used in various WWW client and server programs, especially the famous Mosaic program.

Using URLS can use a unified format to describe various information resources, including files, server addresses and directories. Urls generally consist of three parts:

① Agreement (or Service Mode)

② The IP address (and sometimes port number) of the host accommodating the resource

3 Specify the host resource address. Such as directory and file name

 

URN, uniform Resource Name, identifies the resource by name, for example, mailto:[email protected].

 

Uris are an abstract, high-level concept that defines a uniform resource identity, while urls and UrNs are ways of identifying specific resources. Urls and UrNs are both urIs. Broadly speaking, every URL is a URI, but not necessarily every URI is a URL. This is because URIs also include a subclass, the Uniform Resource Name (URN), which names resources but does not specify how to locate them. The mailto, news, and ISBN URIs above are examples of UrNs.

 

In Java URIs, an instance of a URI can represent either absolute or relative, as long as it follows the syntax rules for URIs. The URL class, on the other hand, 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 to access resources; its only function is parsing.

In contrast, the URL class opens a stream to the resource.

 

Five,HTTP Request message Request

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

 

Request line, header, blank line and request data are composed of four parts. 
Example of a Get request, using a Charles fetch request:

 


GET / 562 f25980001b1b106000338. HTTP / 1.1 JPG Host img.mukewang.com the user-agent Mozilla / 5.0 (Windows NT 10.0; WOW64) AppleWebKit (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: the request line, which specifies the type of request, the resource to access, and the HTTP version to use.

The GET request type for the GET, [/ 562 f25980001b1b106000338. JPG] to access resources, is the last part of the bank use HTTP1.1 version.

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

From the second line, the request header, HOST will indicate the destination of the request. User-agent, which can be accessed by both server-side and client-side scripts, is an important basis for browser type detection logic. This information is defined by your browser, sent automatically on every request, etc

Part 3: Blank lines. Blank lines after the request header are required

There must be empty rows even if the request data in Part 4 is empty.

Part four: Request data, also known as the body, can be added to any other data.

The request data for this example is null.

 

Example of POST request, using Charles fetch request:

POST/HTTP1.1 Host:www.wrox.com user-agent :Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; The.net CLR 2.0.50727; The.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 is clearly a POST request, and http1.1 version.

  The second part: Request header, lines 2 through 6.

  The third part: blank line, blank line 7.

Part 4: Requesting data, line 8.

 

 

 

Vi.HTTP Response message Response

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

  

 

The first part: status line, which consists of HTTP protocol version number, status code and status message.

 

The first behavior status line, (HTTP/1.1) indicates HTTP version 1.1, status code 200, and status message (OK)

 

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

 

The second and third lines act as message headers,

Date: the Date and time when the response is generated. Content-type: Specifies the MIME Type of HTML(text/ HTML). The encoding Type is UTF-8

 

Part 3: Blank lines. Blank lines after the message header are required

 

Part four: Response body: the text message returned by the server to the client.

 

The HTML following the blank line is the response body.

 

Seven,HTTP request methods 

According to the HTTP standard, HTTP requests can use multiple request methods.

HTTP1.0 defines three request methods: GET, POST, and HEAD.

HTTP1.1 adds five new request methods: OPTIONS, PUT, DELETE, TRACE, and CONNECT.


GET requests the specified page information and returns the entity body. A HEAD is similar to a GET request, except that there is no concrete content in the response returned. It is used to retrieve the header and POST to submit data to a specified resource for processing the 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 Transmits data from the client to the server instead of the content of the specified document. DELETE requests the server to DELETE the specified page. CONNECT Reserved in HTTP/1.1 for proxy servers that can pipe connections. OPTIONS allows clients to view server performance. TRACE displays the requests received by the server for testing or diagnosis.


 

Eight,How HTTP works 

The HTTP protocol defines how a Web client requests a Web page from a Web server and how the server delivers the Web page to the client. The HTTP protocol uses a request/response model. The client sends a request packet to the server containing the request method, URL, protocol version, request header, and request data. The server responds with a status line containing the protocol version, success or error code, server information, response headers, and response data.

 

Here are the steps for an HTTP request/response:

 

1. The client connects to the Web server

 

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

 

2. Send HTTP requests

 

Through the TCP socket, the client sends a text request packet to the Web server. A request packet consists of the request line, the request header, the blank line, and the 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 the resource copy to the TCP socket, which is read by the client. A response consists of a status line, a response header, a blank line, and response data.

 

4. Release the TCP connection

 

If the connection mode is set to close, the server actively closes the TCP connection, and the client passively closes the connection to release the TCP connection. If the Connection mode is Keepalive, the connection is kept for a period of time, during which requests can be received.

 

5. The client browser parses the HTML content

 

The client browser first parses the status line to see the status code indicating whether the request was successful. Each response header is then parsed, and the response header tells the following several bytes of HTML document and the document’s character set. The client browser reads the response data HTML, formats it according to the HTML syntax, and displays it in the browser window.

 

For example, enter the URL in the browser address bar and press Enter. The following process occurs:

 

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 port 80.

 

3. The browser sends an HTTP request to read the file (the file following the domain name in the URL). The request packet is sent to the server as the third packet 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 TCP connections.

 

6. The browser will display the HTML text;

 

Nine,The HTTP status code 

  

The status code State information meaning
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 another protocol (new in HTTP 1.1)
200 OK Everything is fine, and the reply documents for the GET and POST requests follow.
201 Created The server has created the document, and the Location header gives its URL.
202 Accepted The request has been accepted, but processing is not yet complete.
203 Non-Authoritative Information The document has returned normally, but some of the reply headers may be incorrect because a copy of the document is used (new in HTTP 1.1).
204 No Content Without a new document, the browser should continue to display the original document. This status code is useful if the user refreshes the page periodically and the Servlet can determine that the user document is sufficiently new.
205 Reset Content There is no new content, but the browser should reset what it shows. Used to force the browser to clear 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 (new in HTTP 1.1).
300 Multiple Choices The document requested by the customer can be found in multiple locations that are already listed in the returned document. If the server wants to propose a preference, it should be indicated in the Location reply header.
301 Moved Permanently The document the customer requested 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 permanent. Note that the corresponding status message in HTTP1.0 is “Moved Temporatily”. When this status code appears, the browser automatically accesses the new URL, so it’s a useful status code. Note that this status code can sometimes be substituted for 301. For example, if the browser incorrectly requests http://host/~user (missing the trailing slash), some servers return 301 and others 302. Strictly speaking, we can only assume that the browser automatically redirects only when the original request is a GET. For details, see 307.
303 See Other Similar to 301/302, except that if the original request was POST, the redirected target document specified by the Location header should be extracted via GET (new in HTTP 1.1).
304 Not Modified The client has the buffered document and makes a conditional request (typically providing an if-modified-since header to indicate that the client only wants to update the document after the specified date). The server informs the client that the cached document can still be used.
305 Use Proxy The document requested by the customer should be extracted via the proxy server specified in the Location header (new in HTTP 1.1).
307 Temporary Redirect Same as 302 (Found). Many browsers will mistakenly redirect in response to a 302 reply, even though the original request was A POST, and even though it can actually redirect only if the reply to a POST request is 303. For this reason, HTTP 1.1 added 307 to make it easier to distinguish between several status codes: browsers can follow redirected GET and POST requests when a 303 reply occurs; If the answer is 307, the browser can only follow the redirection of the GET request. (New in HTTP 1.1)
400 Bad Request Syntax error in request.
401 Unauthorized The customer attempted unauthorized access to a password-protected page. The response contains a www-Authenticate header, which the browser uses to display the user name/password dialog box and re-issue the request 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. This is usually caused by permission Settings on files or directories on the server.
404 Not Found The resource at the specified location could not be found. This is also a common response.
405 Method Not Allowed Request methods (GET, POST, HEAD, DELETE, PUT, TRACE, and so on) are 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 incompatible with the one specified by the customer in the Accpet header (new in HTTP 1.1).
407 Proxy Authentication Required Similar to 401, the client must first be authorized by the proxy server. (New in HTTP 1.1)
408 Request Timeout The client has not made any requests during the server license wait time. The customer can repeat the same request at a later date. (New in HTTP 1.1)
409 Conflict Usually associated with PUT requests. The request cannot succeed because it conflicts with the current state of the resource. (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. It differs from 404 in that returning 407 means the document is permanently removed from the specified location, whereas 404 means 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 fail (new in HTTP 1.1).
413 Request Entity Too Large The size of the target document is larger than the server is currently willing to process. 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 could not satisfy the Range header specified by the customer 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 functionality required to implement the request. For example, a customer makes a PUT request that is not supported by the server.
502 Bad Gateway When a server, acting as a gateway or proxy, accesses the next server to complete a request, but the server returns an invalid reply.
503 Service Unavailable The server is not responding due to maintenance or heavy load. For example, the Servlet might return 503 if the database connection pool is full. The server can provide a retry-after header when it returns 503.
504 Gateway Timeout Used by a server acting as a proxy or gateway to indicate that a reply cannot be received from a remote server in a timely manner. (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)

Ten,System.Net.HttpStatusCode 

  

  1 namespace System.Net
  2 {
  3     //
  4     //Abstract:  5     //Contains the value of the status code defined for HTTP.
  6     public enum HttpStatusCode
  7     {
  8         //
  9         //Abstract: 10         //Equivalent to HTTP state 100. The client can continue its request System.Net.HttpStatusCode.Continue instructions.
 11         Continue = 100. 12         //
 13         //Abstract: 14         //Equivalent to HTTP status 101. System.Net.HttpStatusCode.SwitchingProtocols indicates the protocol version or is change.
 15         SwitchingProtocols = 101. 16         //
 17         //Abstract: 18         //Equivalent to HTTP status 200. System.Net.HttpStatusCode.OK instructions request is successful, and requested information included in the response. This is the most common status code to receive.
 19         OK = 200. 20         //
 21         //Abstract: 22         //Equivalent to HTTP state 201. System.Net.HttpStatusCode.Created instruction requests sent response before creating a new resource.
 23         Created = 201. 24         //
 25         //Abstract: 26         //Equivalent to HTTP state 202. System.Net.HttpStatusCode.Accepted instructions request has been accepted for further processing.
 27         Accepted = 202. 28         //
 29         //Abstract: 30         //Equivalent to HTTP state 203. System.Net.HttpStatusCode.NonAuthoritativeInformation indicates the meta information returned from cached copy instead of the original server, so may not be correct.
 31         NonAuthoritativeInformation = 203. 32         //
 33         //Abstract: 34         //Equivalent to HTTP state 204. System.Net.HttpStatusCode.NoContent instruction has been successfully processed the request and response is intentionally left blank.
 35         NoContent = 204. 36         //
 37         //Abstract: 38         //Equivalent to HTTP state 205. System.Net.HttpStatusCode.ResetContent indicating the client should be reset, not reload the current resources.
 39         ResetContent = 205. 40         //
 41         //Abstract: 42         //This is equivalent to HTTP 206 status. System.Net.HttpStatusCode.PartialContent instructions upon the request of the including byte range GET request, the response is part of the response.
 43         PartialContent = 206. 44         //
 45         //Abstract: 46         //Equivalent to HTTP state 300. There are many representations System.Net.HttpStatusCode.MultipleChoices indicating the required information. The default action is to treat this state as a redirect and label the contents of the header according to the location associated with this response.
 47         MultipleChoices = 300. 48         //
 49         //Abstract: 50         //Equivalent to HTTP state 300. There are many representations System.Net.HttpStatusCode.Ambiguous indicating the required information. The default action is to treat this state as a redirect and label the contents of the header according to the location associated with this response.
 51         Ambiguous = 300. 52         //
 53         //Abstract: 54         //Equivalent to HTTP state 301. System.Net.HttpStatusCode.MovedPermanently indicating to the information needed to move to the location specified in the header 55         //URI. The default action when this status is received is to follow the location header associated with the response.
 56         MovedPermanently = 301. 57         //
 58         //Abstract: 59         //Equivalent to HTTP state 301. System.Net.HttpStatusCode.Moved indicating to the information needed to move to the location of the header in the specified URI. The default action when this status is received 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         //Abstract: 64         //Equivalent to HTTP state 302. System.Net.HttpStatusCode.Found indicating the required information in the location of the header in the specified URI. 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         //Abstract: 69         //Equivalent to HTTP state 302. System.Net.HttpStatusCode.Redirect indicating the required information in the location of the header in the specified URI. 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         //This is equivalent to HTTP state 303. System.Net.HttpStatusCode.SeeOther clients will automatically redirect to the location of the header in the specified as a result of the announcement 75         //URI. Requests for resources in the specified location header will be performed with GET.
 76         SeeOther = 303. 77         //
 78         //Abstract: 79         //This is equivalent to HTTP state 303. System.Net.HttpStatusCode.RedirectMethod clients will automatically redirect to the location of the header in the specified as a result of the announcement 80         //URI. Requests for resources in the specified location header will be performed with GET.
 81         RedirectMethod = 303. 82         //
 83         //Abstract: 84         //Equivalent to HTTP status 304. A copy of the client cache is the latest System.Net.HttpStatusCode.NotModified instructions. The content of the resource is not transmitted.
 85         NotModified = 304. 86         //
 87         //Abstract: 88         //Equivalent to HTTP state 305. System.Net.HttpStatusCode.UseProxy indicates the request should be used in the location of the header specifies the uri of the proxy server.
 89         UseProxy = 305. 90         //
 91         //Abstract: 92         //Equivalent to HTTP state 306. System.Net.HttpStatusCode.Unused is not completely specified HTTP / 1.1 specification proposal extension.
 93         Unused = 306. 94         //
 95         //Abstract: 96         //Equivalent to HTTP state 307. System.Net.HttpStatusCode.TemporaryRedirect instructs the request information is located in the location specified in the header 97         //URI. The default action when this status is received is to follow the location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.
 98         TemporaryRedirect = 307. 99         //
100         //Abstract:101         //Equivalent to HTTP state 307. System.Net.HttpStatusCode.RedirectKeepVerb instructs the request information is located in the location specified in the header102         //URI. The default action when this status is received is to follow the location header associated with the response. When the original request method was 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 instructions cannot by the server understood the request. System.Net.HttpStatusCode.BadRequest107         //If no other error applies, 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 state 401. The requested resource requires authentication System.Net.HttpStatusCode.Unauthorized instructions. Www-authenticate112         //The header contains details of how authentication is performed.
113         Unauthorized = 401.114         //
115         //Abstract:116         //Equivalent to HTTP state 402. System.Net.HttpStatusCode.PaymentRequired has been reserved for future use.
117         PaymentRequired = 402.118         //
119         //Abstract:120         //Equivalent to HTTP state 403. System.Net.HttpStatusCode.Forbidden instructs the server refused to cannot complete the request.
121         Forbidden = 403.122         //
123         //Abstract:124         //Equivalent to HTTP state 404. System.Net.HttpStatusCode.NotFound indicating the requested resource does not exist on the server.
125         NotFound = 404.126         //
127         //Abstract:128         //Equivalent to HTTP state 405. System.Net.HttpStatusCode.MethodNotAllowed instructions request method (POST or GET)129         //The requested resource is not allowed.
130         MethodNotAllowed = 405.131         //
132         //Abstract:133         //Equivalent to HTTP state 406. System.Net.HttpStatusCode.NotAcceptable represent the client use the Accept header has been specified, it will not Accept any of the available resources.
134         NotAcceptable = 406.135         //
136         //Abstract:137         //Equivalent to HTTP status 407. System.Net.HttpStatusCode.ProxyAuthenticationRequired indicates the agent requires authentication request.138         //The proxy server does authentication header contains details about how to perform authentication.
139         ProxyAuthenticationRequired = 407.140         //
141         //Abstract:142         //This is equivalent to HTTP state 408. System.Net.HttpStatusCode.RequestTimeout indicating the server to the client not expected request time did not send the request.
143         RequestTimeout = 408.144         //
145         //Abstract:146         //Equivalent to HTTP state 409. System.Net.HttpStatusCode.Conflict indicate the request may not perform because of the conflict on the server.
147         Conflict = 409.148         //
149         //Abstract:150         //This parameter is equivalent to HTTP state 410. System.Net.HttpStatusCode.Gone indicating the requested resource is no longer available.
151         Gone = 410.152         //
153         //Abstract:154         //Equivalent to HTTP status 411. The content of the System.Net.HttpStatusCode.LengthRequired indicating a lack of necessary length header.
155         LengthRequired = 411.156         //
157         //Abstract:158         //Equivalent to HTTP state 412. System.Net.HttpStatusCode.PreconditionFailed said failure, the request of the conditions set, unable to execute the request.159         //Use the conditional request header If matching items, such as setting the condition no -if-match, or if-modified-ever.
160         PreconditionFailed = 412.161         //
162         //Abstract:163         //Equivalent to HTTP state 413. System.Net.HttpStatusCode.RequestEntityTooLarge instructions too big servers able to handle the request.
164         RequestEntityTooLarge = 413.165         //
166         //Abstract:167         //Equivalent to HTTP state 414. System.Net.HttpStatusCode.RequestUriTooLong instructions URI is too long.
168         RequestUriTooLong = 414.169         //
170         //Abstract:171         //Equivalent to HTTP state 415. System.Net.HttpStatusCode.UnsupportedMediaType indicate the request type is not supported.
172         UnsupportedMediaType = 415.173         //
174         //Abstract:175         //Equivalent to HTTP 416 status. System.Net.HttpStatusCode.RequestedRangeNotSatisfiable instructions from the scope of resource request data cannot be returned, or because the scope of the beginning, and then the beginning or after the end of the range of the resource at the end of the resources.
176         RequestedRangeNotSatisfiable = 416.177         //
178         //Abstract:179         //Equivalent to HTTP state 417. System.Net.HttpStatusCode.ExpectationFailed instructions cannot satisfy Expect by the server180         //Given in the header.
181         ExpectationFailed = 417.182         //
183         //Abstract:184         //Equivalent to HTTP state 426. System.Net.HttpStatusCode.UpgradeRequired indicating the client should switch to a different protocol, for example185         //The TLS / 1.0.
186         UpgradeRequired = 426.187         //
188         //Abstract:189         //Equivalent to HTTP status 500. System.Net.HttpStatusCode.InternalServerError said general error occurred on the server.
190         InternalServerError = 500.191         //
192         //Abstract:193         //Equivalent to HTTP state 501. System.Net.HttpStatusCode.NotImplemented instructs the server does not support the requested function.
194         NotImplemented = 501.195         //
196         //Abstract:197         //Equivalent to HTTP state 502. System.Net.HttpStatusCode.BadGateway instructions intermediate proxy servers from another agent or the original server receives the error response.
198         BadGateway = 502.199         //
200         //Abstract:201         //Equivalent to HTTP state 503. System.Net.HttpStatusCode.ServiceUnavailable indicating the server is temporarily unavailable, usually due to high load or maintenance.
202         ServiceUnavailable = 503.203         //
204         //Abstract:205         //Equivalent to HTTP state 504. System.Net.HttpStatusCode.GatewayTimeout instructions intermediate proxy servers waiting from another agency or the original server response has timeout.
206         GatewayTimeout = 504.207         //
208         //Abstract:209         //Equivalent to HTTP state 505. System.Net.HttpStatusCode.HttpVersionNotSupported instructs the server does not support the request210         //The HTTP version.
211         HttpVersionNotSupported = 505
212     }
213 }