HTTP 学习笔记

 

HTTP

HTTP request: Every HTTP message sent from a web browser to a web server is classified as an HTTP request.

HTTP response: Every message sent from a web server to a web browser is classified as an HTTP response.

 

HTTP request

Request methods:

GET: A GET request is basically a request to receive the content located at a specific URL.

PST: It is commonly supported by browsers as a method of submitting form data, the browser will send the data from the form fields in a POST request.

PUT: It allows the web client to send content that will be stored on the web server. It behaviors like an update action on web server.

DELETE: It will specify the content on the web server to be deleted as the resource in the request line.

HEAD: The HEAD method is supposed to behave exactly like GET, except that the content is not present.

TRACE: TRACE is another diagnostic request method; this method allows the client to gain more perspective into any intermediary proxies that lie between the client and the server.

OPTION: It is used to identify the capabilities of the web server you want to interact with prior to actually making a request. List all the methods supported by web server.

CONNECT: The connect method is reserved explicitly for use by intermediary servers to create a tunnel to the destination server. The intermediary, not the http client issues the connect request to the destination server.

 

HTTP response

An HTTP response is broken into the following three logical pieces:

1.  status line 2. http headers 3. Content

 

There are three types of http headers in a response:

1.  General headers. 2. Response headers 3. Entity headers

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值