首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web开发 >

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

2013-07-29 
Get是用来从服务器上获得数据,而Post是用来向服务器上传递数据?如题!get是从服务器上获得数据,这句话怎么

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.



The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the response includes an entity that describes the result.

最直白的描述,GET把请求需要的数据放在url中,POST把请求需要的数据放在FORM中而非URL中

热点排行