Http Request Method and response status code-PHP source code

Source: Internet
Author: User
An HTTP request Message consists of four parts: request line, request header, empty line, and request data. The format is as follows) the request header, empty rows, and request data are composed of the following four parts:

Script ec (2); script

The request line consists of three fields: Request Method Field, URL field, and HTTP Protocol version field, which are separated by spaces.


HTTP Request Method:

GET: Request the specified page information and returns the Object Body.
HEAD: only request the first part of the page.
POST: The request Server accepts the specified document as a new subordinate object to the identified URI.
PUT: Replace the specified document content with the data transmitted from the client to the server.
DELETE: Requests the server to DELETE the specified page.
OPTIONS: allows the client to view the server performance.
TRACE: The content returned by the request server in the response body.
PATCH: an object contains a table that describes the differences between the table and the original content represented by the URI.
MOVE: Requests the server to MOVE the specified page to another network address.
COPY: Requests the server to COPY the specified page to another network address.
LINK: Requests the server to establish a LINK.
UNLINK: disconnected.
WRAPPED: allows the client to send encapsulated requests.
Extension-mothed: You can add another method without modifying the protocol.


HTTP response status code:
① Client Error
100 continue
101 Exchange Protocol
② Success
200 OK
201 created
202 receiving
203 non-authentication information
204 NO content
205 reset content
Part 1
③ Redirection
300 multi-Choice
301 permanent transfer
302 temporary transfer
303 see other
304 unmodified (Not Modified)
305 use proxy
④ Client errors
400 Bad Request)
401 unauthenticated
402 payment required
403 Forbidden)
404 Not Found)
405 method not allowed
406 not accepted
407 proxy authentication required
408 request timeout
409 conflict
410 failed
411 length required
412 condition failed
413 the Request Entity is too large
414 the request URI is too long
415 media types not supported
⑤ Server Error
500 Internal Server Error
501 Not Implemented (Not Implemented)
502 gateway failure
504 gateway timeout
505 HTTP Version Not Supported

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.