Problem with json

Asked

Viewed 45 times

2

Why am I unable to recover this json from the web service of the api I am using.

var url = "https://api.roomorama.com/v1.0/rooms.json?access_token=RS97GGOxoeuo66dXwF4UcHhjmgKjUnAjDiBVDAVTo";  
function preenche(){
     $.getJSON(url, function(dados){
        //log para mostrar quando o getJson funcionou
        $('.greeting-thumbnail').append(" 1234");
     });
}
  • 1

    CORS problem, you will need to use JSONP, but I do not know if the server accepts... I will look again soon. It may be that others help however.

  • 1

    This issue is recurring here Sopt. Look at this question and its links. In short, you can try to use jQuery.support.cors = true or $.get(url, callback, 'jsonp'), but will depend on server settings.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.