none
Unable to consume cross domain web service in sharepoint RRS feed

  • Question

  • HI ,

    i am trying to consume a response like this 

    {"Resp":{"BuyingPrice":"Value","CreatedBy":"Value","Currency":"Value","Description":"Value","Distributor":Value,"DistributorCity":"Value"}

    i am using a code below 

     $.ajax({
        crossDomain: true,
        type: 'GET',
        username: "value", 
       password: "value",
        contentType: "application/json; charset=utf-8",
        url: "value",
        dataType: "jsonp",
        success: onDataReceived
        
    });

    function onDataReceived(data)
    {
    debugger;
    alert(JSON.stringify(data));
        alert("Data received");
       
    }

     

    I am getting unexpected token as error .When I investigate more I can see the URL followed by 

    "?callback=jQuery3110512…_1489476298510&_=1489476298511:1 and clikinh on this gives me output .I am missing something can some one help


    Tuesday, March 14, 2017 10:24 AM