0

I made an ajax call from my client, not visual page

    $.ajax({
       type: 'GET',
       url : requestUrl,
       //add the authorization header including the access_token
       requestHeaders : {
           'Authorization' : 'Bearer '+accessToken,
           'Content-Type' : 'application/json'
       },
       //data : accountInfoJson,
       success : function(response){
           console.log(JSON.stringify(response));
           displayAccountInfo(response);
           console.log(response);
       },
       error: function(response){
           displayError(response);
       }
   });

I got Status Code:200 OK, and "responseText":"", but the response is a little weird, no data returned to me

/**/jQuery111309983907117930406_1495102068775({"query":{"count":"0","created":"2017-05-18T10:07:58Z","lang":"ja"},"results":[]});

I don't know what went wrong, anyone can tell me what went wrong, thanks.

  • So, are you sure that your environment have data to be returned for this request and your user has access to those data? – kurunve May 18 '17 at 10:29
  • @kurunve I tested it at workbench.developerforce.com, I'm sure data are there, and I also set consumer key and secret key for my client – Ben May 18 '17 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.