HTTP Requests and Response

An HTTP request consists of a request method, a request URL, header fields, and a body. HTTP 1.1 defines the following request methods:

GET: Retrieves the resource identified by the request URL HEAD: Returns the headers identified by the request URL POST: Sends data of unlimited length to the Web server PUT: Stores a resource under the request URL DELETE: Removes the resource identified by the request URL OPTIONS: Returns the HTTP methods the server supports TRACE: Returns the header fields sent with the TRACE request

HTTP 1.0 includes only the GET, HEAD, and POST methods.

An HTTP response contains a result code, header fields, and a body. The HTTP protocol expects the result code and all header fields to be returned before any body content.

Some commonly used status codes include the following:

404: Indicates that the requested resource is not available 401: Indicates that the request requires HTTP authentication 500: Indicates an error inside the HTTP server which prevented it from fulfilling the request 503: Indicates that the HTTP server is temporarily overloaded, and unable to handle the request

for more info

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值