gpt4 book ai didi

post - GET 与 POST(表单处理)

转载 作者:行者123 更新时间:2023-12-02 10:42:03 26 4
gpt4 key购买 nike

我完全理解两者在表单处理、用户自由裁量权和数据隐私方面的差异,但在什么情况下,在发送表单结果时,有人会更愿意使用 GET 而不是 POST?

谢谢

最佳答案

W3C HTML 4.01 Recommendation on the appropriate usage of GET and POST:

The "get" method should be used when the form is idempotent (i.e., causes no side-effects). Many database searches have no visible side-effects and make ideal applications for the "get" method.

If the service associated with the processing of a form causes side effects (for example, if the form modifies a database or subscription to a service), the "post" method should be used.

Note: The "get" method restricts form data set values to ASCII characters. Only the "post" method (with enctype="multipart/form-data") is specified to cover the entire [ISO10646] character set.

关于post - GET 与 POST(表单处理),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4668701/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com