简体   繁体   中英

Get JSON response using jQuery.ajax request to an appengine URL?

I tried to get response data using ajax from the below url

http://recipesid.appspot.com/api.user?method=user.query&email=dam.le@anttek.com

But it will not run anyway.

Help me to solve the issue

$.ajax({
        type: "GET", //rest Type
        dataType: 'jsonp', //mispelled
        url: "http://recipesid.appspot.com/api.user?method=user.query&email=dam.le@anttek.com",
        async: false,
        contentType: "application/json; charset=UTF-8",
        success: function (msg) {
            alert(msg);                
        },
        error:
    function(data){ 
        alert("error");
    } });

Thanks in advance !!

Thanks for all answers. but i got a solution.

I must allow "Access-Control-Allow-Origin" in my google app engine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM