Quantcast
Channel: SCN : Popular Discussions - SAP NetWeaver Gateway Developer Center
Viewing all articles
Browse latest Browse all 1657

Unable to call Odata url using ajax call

$
0
0

Hi Experts,

 

I tried with following code to get the data from odata url. But it didn't work.

 

Can any help me how to call get the data from odata URL using ajax call.

 

$.ajax({
  url
: WEBSERVICE_URL,
  type
:"GET",//This is what you should chage
  dataType
:"application/json; charset=utf-8",
  username
:"admin",/
  password
:"admin",
  processData
:false,
  contentType
:"application/json",
  success
:function(){
  alert
("success");
  
},
  error
:function(xhr, ajaxOptions, thrownError){//Add these parameters to display the required response
  alert
(xhr.status);
  alert
(xhr.responseText);
  
},
});


Viewing all articles
Browse latest Browse all 1657

Trending Articles