I know the difference between POST and GET, however if I used POST instead of GET, anything not good besides not up to W3C standards? Anything inefficiency, insecurity or anything else?
相关问题
- Angular RxJS mergeMap types
- HTML form is not sending $_POST values
- Google Apps Script: testing doPost() with cURL
- How to instantiate Http service in main.ts manuall
- POST Base64 encoded data in PHP
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- C#中 public virtual string Category { get; }这么写会报错:
- 请大神帮忙 post向https接口发送数据 部署到服务器为什么运行一会后就会报空指针
- WCF发布Windows服务 POST方式报错 GET方式没有问题 应该怎么解决?
- 用 $.ajax POST 请求数据报错
- 设备发送一个http post请求,接收不到
- Is a unicode user agent legal inside an HTTP heade
- git: retry if http request failed
See the answer from deceze:
In all the interviews I've done, all the teaching I've done, this is the best place to start. There's a lot more, but start with this.
Ignore anything anyone says about security. A good hacker can change POST to GET easily.
If you get this far, know that POST changes data (adds a membership, or charges a credit card), whereas GET only fetches data (searches for red shirts). The makers of browsers make their browsers behave differently for the results of POST vs GET. The results of POST have side effects that you may not want to repeat (such as adding another membership or double charging a credit card).
If you understand THIS, then read about the POST-Redirect-GET pattern, and understand it well. (Then know that GET has a URL length limit, and that you may need to resort to POST in this case.)
Never use POST requests for normal view-only pages. POST requests can't be bookmarked, send in an email or otherwise be reused. They screw up proper navigation using the browsers back/forward buttons. Only ever use them for sending data to the server in one unique operation and (usually) have the server answer with a redirect.
Other than that, they're not more or less efficient or secure than GET requests, they're just for a different purpose.