GET与POST的Ajax请求:何时以及如何使用要么? [英] GET vs. POST ajax requests: When and how to use either?

查看:154
本文介绍了GET与POST的Ajax请求:何时以及如何使用要么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建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)

这篇关于GET与POST的Ajax请求:何时以及如何使用要么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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