PHP HTTP request method and response status code finishing tutorial

Source: Internet
Author: User

The HTTP request message consists of a request line, a request header (header), a blank line, and 4 parts of the request data, with the following visible request line consisting of 3 fields in the Request Method field, the URL field, and the HTTP protocol version field, which are separated by a space

An HTTP request message consists of a request line, a request header (header), a blank line, and 4 parts of the requested data, in the following format

The visible request line consists of 3 fields in the Request Method field, the URL field, and the HTTP protocol version field, separated by a space.
HTTP request Method:

GET: Requests the specified page information and returns the entity principal.

HEAD: Only the header of the page is requested.

POST: The requesting server accepts the specified document as a new subordinate entity for the identified URI.

PUT: Supersedes the contents of the specified document from the data that the client sends to the server.

Delete: The requested server deletes the specified page.

OPTIONS: Allow clients to view server performance.

TRACE: The request server returns the resulting content in the entity body portion of the response.

PATCH: The entity contains a table that describes the differences from the original content represented by the URI.

Move: The requesting server moves the specified page to another network address.

Copy: The request server copies the specified page to another network address.

Link: Request the server to establish a link relationship.

UNLINK: Break link relationship.

Wrapped: Allows the client to send encapsulated requests.

Extension-mothed: Additional methods can be added without altering the protocol.

HTTP response Status code: ① Client Side error
100 continue
101 Exchange Protocol
② success
OK
201 Created
202 Reception
203 Non-certified information
204 No Content
205 Resetting Content
206 part of the content
③ redirection
300 multi-channel selection
301 Permanent Transfer
302 Temporary transfer
303 See other
304 unmodified (not Modified)
305 using Proxies
④ Client Side Error
400 error requests (Bad request)
401 Not certified
402 Fee Required
403 Prohibition (Forbidden)
404 Not Found (not Found)
405 method does not allow
406 Not Accepted
407 Requires agent authentication
408 Request timed out
409 conflicts
410 failure
411 Required Length
412 Pieces failed
413 Request Entity too large
414 Request URI too long
415 Media type not supported
⑤ Server Error
500 Server Internal Error
501 Not implemented (not implemented)
502 Gateway Failure
504 Gateway Timeout
505 HTTP Version not supported

PHP HTTP request method and response status code finishing tutorial

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.