当前位置: 代码迷 >> Web开发 >> Get是用以从服务器上获得数据,而Post是用来向服务器上传递数据
  详细解决方案

Get是用以从服务器上获得数据,而Post是用来向服务器上传递数据

热度:125   发布时间:2013-07-29 10:30:31.0
Get是用来从服务器上获得数据,而Post是用来向服务器上传递数据?
如题!
get是从服务器上获得数据,这句话怎么理解。
(按我的理解,两个都是向服务器发送数据),
请高手给讲解一下。谢
JSP SERVLET

------解决方案--------------------
参考:http://www.w3.org/Protocols/rfc2616/rfc2616.txt
------解决方案--------------------
GET:
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

POST:
The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:

      - Annotation of existing resources;

      - Posting a message to a bulletin board, newsgroup, mailing list,
        or similar group of articles;

      - Providing a block of data, such as the result of submitting a
        form, to a data-handling process;

      - Extending a database through an append operation.

The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a database.
  相关解决方案