gpt4 book ai didi

html - 如何使用POST方式发送大数据?

转载 作者:太空狗 更新时间:2023-10-29 14:59:10 29 4
gpt4 key购买 nike

如何使用 POST 方法发送大量数据?

听说 post 方法默认是 8M 现在如果你超过那个大小怎么办?您将如何向服务器发送纯文本?

最佳答案

David 的一个很好的回答:

The url portion of a request (GET and POST) can be limited by both the browser and the server - generally the safe size is 2KB as there are almost no browsers or servers that use a smaller limit.

The body of a request (POST) is normally* limited by the server on a byte size basis in order to prevent a type of DoS attack (note that this means character escaping can increase the byte size of the body). The most common server setting is 10MB, though all popular servers allow this to be increased or decreased via a setting file or panel.

*Some exceptions exist with older cell phone or other small device browsers - in those cases it is more a function of heap space reserved for this purpose on the device then anything else.

What is the size limit of a post request?

注意:URL 的 2MB 数据意味着一个请求中有 2097152 个字符。

此外,如果你想发送更多数据,你可以使用multipal ajax request

关于html - 如何使用POST方式发送大数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12475116/

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