GET与POST的Ajax请求:何时以及如何使用要么?如何使用、GET、POST、Ajax

2023-09-10 16:11:17 作者:钱包里的毛爷爷被人拐跑了

创建Ajax请求时有什么GET过POST的优势,反之亦然?我怎么知道,我应该使用在任何给定的时间?它是一个安全意识的决定?

What are the strengths of GET over POST and vice versa when creating an ajax request? How do I know which I should use at any given time? Is it a security-minded decision?

此外,什么是他们是如何实际发送的区别?

Also, what is the difference in how they are actually sent?

推荐答案

POST请求,你不希望意外发生的请求。 GET请求是请求你确定有发生由用户通过一个URL指向一个浏览器。

POST requests are requests that you do not want to accidentally happen. GET requests are requests you are OK with happening by a user pointing a browser to via a URL.

GET请求可以很简单,因为他们的数据是基于在URL中重复。

GET requests can be repeated quite simply since their data is based in the URL itself.

您应该考虑一下AJAX请求像你想想常规形式请求(和他们的GET和POST)

You should think about AJAX requests like you think about regular form requests (and their GET and POST)