更新时间:2023-01-17 10:38:10
是否存在"URI太长"的解决方法?
Are there workarounds of "URI too long" thing?
使用POST HTTP动词代替GET:
Use a POST HTTP verb instead of GET:
$.ajax({
url: '/foo',
type: 'POST',
data: { value: someVariableThatCouldBeHuge },
success: function(result) {
// TODO: process the results
}
});
或等价物:
$.post('/foo', { value: someVariableThatCouldBeHuge }, function(result) {
// TODO: process the results
});