Is either GET or POST more secure than the other?

前端 未结 27 2685
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 05:13

When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than the other? If so, why?

27条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 05:51

    My usual methodology for choosing is something like:

    • GET for items that will be retrieved later by URL
      • E.g. Search should be GET so you can do search.php?s=XXX later on
    • POST for items that will be sent
      • This is relatively invisible comapred to GET and harder to send, but data can still be sent via cURL.

提交回复
热议问题