Http POST - encode form data in body of HTML message
Http GET - encode form and other data in URL
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect. (This is also true of some other HTTP methods.)[1] The W3C has published guidance principles on this distinction, saying, "Web application design should be informed by the above principles, but also by the relevant limitations."[13] See safe methods below.
The POST method requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The data POSTed might be, for example, an annotation for existing resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data that is the result of submitting a web form to a data-handling process; or an item to add to a database.
本文详细解释了HTTP请求中GET与POST方法的区别:GET方法用于请求指定资源的表示形式,通常仅用于检索数据且不应产生副作用;POST方法则用于请求服务器接受随请求发送的数据作为新子资源。此外还介绍了这两种方法在实际应用中的具体场景。

被折叠的 条评论
为什么被折叠?



