GET和POST方法有什么区别? [英] What is the difference between GET and POST methods?

查看:132
本文介绍了GET和POST方法有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:


我知道GET和POST方法之间的基本区别。也就是说,我们可以在GET的情况下看到URL参数,并且在POST的情况下无法看到URL参数。当然,我们可以通过POST传递大量的数据,这是通过GET无法实现的。



这两种方法之间还有其他区别吗?

解决方案

GET仅用于数据检索。你可以改进你得到的东西,但它是一个只读设置,是的,正如你所提到的任何用于细化的东西都是URL的一部分。



POST是用于发送数据,但通常是破坏HTML简单工作的一种方式,因为您无法保证发生的任何事情,只能获取数据,发送数据或删除数据。



HTML标准中还有PUT和DELETE,但它的全部内容都是寻找支持这些操作的Web服务器。由于名称暗示PUT发送数据用于创建或更新,而DELETE用于删除数据。



享受! :)

Possible Duplicate:
When do you use POST and when do you use GET?

I know the basic difference between GET and POST methods. That is we can see the URL parameters in case of GET and can't see the URL parameters in case of POST. Of course we can pass huge amounts of data by POST which is not possible through GET.

Are there any other differences between these two methods ?

解决方案

GET is for data retrieval only. You can refine what you are getting but it is a read only setup and yes, as you mentioned anything used for refinement are part of the URL.

POST is meant for sending data, but is generally a way to 'break' the simple workings of HTML because you are neither guaranteed of anything that is happening, it can just fetch data, send data or delete data.

There are also PUT and DELETE in the HTML standards, but its all about finding web servers that support these actions as well. As the names imply PUT sends data for either the creation or updating while DELETE is for removal of data.

Enjoy! :)

这篇关于GET和POST方法有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆