JSON response from jQuery get raises “Invalid label”

后端 未结 6 1213
日久生厌
日久生厌 2020-12-20 07:10
       $.ajax({
  beforeSend: function(xhr) {
 xhr.setRequestHeader(\'Authorization\', \"Basic YWRtaW46YWRtaW4=\");        
},
   url: \"https://test.com/incident.do         


        
6条回答
  •  猫巷女王i
    2020-12-20 07:45

    try to get the data as a plain text and convert it into json on client side. I use "http://www.json.org/json2.js" script to do this. It helped me to resolve "invalid label" problem in my application. (I mentioned the script because eval() function didn't help, no idea why...)

    good luck :)

提交回复
热议问题