且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HTTP错误414请求URL太长

更新时间:2021-08-06 00:10:46

据的这个问题 URL的最大实际长度为2000个字符。这不会是能容纳一个巨大的***的文章一样,你要发送。

According to this question the maximum practical length of a URL is 2000 characters. This isn't going to be able to hold a massive Wikipedia article like you're trying to send.

。您需要添加一个数据价值,你传递给Ajax调用函数的对象。像这样的:

Instead of putting the data on the URL you should be putting it in the body of a POST request. You need to add a data value to the object you're passing to the ajax function call. Like this:

function editAbout(){

    var about=escape( $("#editorAbout").text());
    $.ajax({
        url: "Allcammand.aspx?cmd=EditAboutCompany&idCompany="+getParam("idCompany"),
        type:"post",
        async: false,
        data: {
            about: about
        },
        success: function(response){                                       
        },
        error:function(xhr, ajaxOptions, thrownError){alert(xhr.responseText); ShowMessage("??? ?? ?????? ??????? ????","fail");}
    });
}