How php parses http objects

(*-*)浩
Release: 2023-02-25 17:10:01
Original
2779 people have browsed it

php parses the six request methods of the HTTP protocol: get, head, put, delete, post

How php parses http objects

##GET: Request the specified page information and return the entity body.

HEAD: Only the header of the page is requested.(Recommended learning:PHP video tutorial)

POST: Requests the server to accept the specified document as a new subordinate entity to the identified URI.

PUT: The data transferred from the client to the server replaces the contents of the specified document.

DELETE: Request the server to delete the specified page.

get and post are more common. The GET request places the submitted data in the HTTP request protocol header

The data submitted by POST is placed in the entity data

Http protocol

HTTP is an application layer protocol, consisting of requests and responses, and is a standard client-server model. HTTP is a stateless protocol.

Request message example

How php parses http objects

GET /public/api/index?id=1 HTTP/1.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Cache-Control: max-age=0 Connection: keep-alive Host: 192.168.10.10:8088 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Copy after login

The above is the detailed content of How php parses http objects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!