GET Request - Why is my URI so long?

删除回忆录丶 提交于 2019-12-11 07:59:54

问题


I'm making a GET request using the PARSE API. I'm getting a "414 Request-URI Too Large" error, but I don't understand why. Here is the code for my request:

 $.ajax({ 
      url : 'https://api.parse.com/1/classes/chats',
      type : 'GET',
      dataType: 'json',
      data : JSON.stringify({   
        order: '-createdAt',    
      }),
      success : function(data) {
        handleData(data)
      },
      error : function(data) {
        console.log('error: ' + data);
      }
    });

回答1:


Because the server says so, e.g. the service you're querying against is so configured. From Wikipedia

414 Request-URI Too Long The URI provided was too long for the server to process - The HTTP/1.1 Specification. Often the result of too much data being encoded as a query-string of a GET request, in which case it should be converted to a POST request.



来源:https://stackoverflow.com/questions/20157706/get-request-why-is-my-uri-so-long

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!