The Ajax request parameter is too long and the request fails

The Ajax request parameter is relatively long. The parameter in the fifth line is about 1100 characters, which is the request message of the interface.

 1 $.ajax({
 2             type:"POST",
 3             url:"${ctx}/test.action?method=invokeInfo",
 4             //beforeSend:alert("beforeSend"),
 5             data:{reqXmlStr:newReqXmlStr},//传给服务器的参数
 6             
 7             success:function(result){
 8                  alert("success");    
 9             }
10 });        

When type="get", the ajax request may fail because the parameter is too long. Changing it to Post can solve it.

Background of the problem: At that time, I saw that the message was not long. Later, I saw that the number of characters was more than 1,000, which was indeed quite a lot.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324751703&siteId=291194637