I am trying to access the XML-RPC of my local drupal installation, from javascript. Here is the code:
$.ajax({
type: "POST",
url: "http://www.sms2.com/services/xmlrpc",
dataType: "xml",
data: {"method": "node.get",
"nid": 1
},
success: function(msg) {
//alert("data: " + msg.type );
console.log("amrit");
}
});
My drupal index file is in /home/dark/web_root/sms2/index.php and HTML file is in /home/dark/web_root/sms2/test.html
'sms2' is set from /etc/hosts file.
This is the response I am getting:
can anyone tell me what going on? I tried almost all the possible options but of no use..
POST tab:
Its working fine from the XML-RPC admin screen!
Thanks