http的请求方式

xiaoxiao2021-02-28  35

1) GET:- Used when the client is requesting a resource on the Web server.

当客户端向Web服务器请求一个资源的时候使用。

2) HEAD:- Used when the client is requesting some information about a resource but not requesting the resource itself.

当客户端向Web服务器请求一个资源的一些信息而不是资源的全部信息的时候使用。

3) POST:- Used when the client is sending information or data to the server—for example, filling out an online form (i.e. Sends a large amount of complex data to the Web Server).

当客户端向服务端发送信息或者数据的时候使用–例如,表单提交(向Web服务器发送大量的复杂的数据)。

4) PUT:- Used when the client is sending a replacement document or uploading a new document to the Web server under the request URL.

当客户端向Web服务端指定URL发送一个替换的文档或者上传一个新万当的时候使用。

5) DELETE:- Used when the client is trying to delete a document from the Web server, identified by the request URL.

当客户端尝试从Web服务端删除一个由请求URL唯一标识的文档的时候使用。

6) TRACE:- Used when the client is asking the available proxies or intermediate servers changing the request to announce themselves.

当客户端要求可用的代理服务器或者中间服务更改请求来宣布自己的时候使用。回显服务器收到的请求,主要用于测试或诊断。

7) OPTIONS:- Used when the client wants to determine other available methods to retrieve or process a document on the Web server.

当客户端想要决定其他可用的方法来检索或者处理Web服务端的一个文档时使用。

8) CONNECT:- Used when the client wants to establish a transparent connection to a remote host, usually to facilitate SSL-encrypted communication (HTTPS) through an HTTP proxy.

当客户端想要确定一个明确的连接到远程主机的时候使用,通常便于通过Http代理服务器进行SSL加密通信(Https)连接使用。在实际应用中常用的也就是get和post,其他的请求方式也可以通过get和post间接实现。

特定的HTTP服务器还能够扩展自定义的方法

9) PATCH:-用于将局部修改应用到资源。

原文地址: http://javaeedevelop.iteye.com/blog/1725299

转载请注明原文地址: https://www.6miu.com/read-2684068.html

最新回复(0)