Skip to main content
deleted 22 characters in body
Source Link
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
var filter = encodeURI("?$filter=Title eq 'some title'");
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName + filter,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "text/xml; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "xml"
})
.done(function(xmlDoc, status, responseObj) {
    //handle
})
.fail(function(xmlDoc, status, responseObj) {
    //handle
})
.always(function() {
    //handle
});
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
var filter = encodeURI("?$filter=Title eq 'some title'");
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName + filter,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "text/xml; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "xml"
})
.done(function(xmlDoc, status, responseObj) {
    //handle
})
.fail(function(xmlDoc, status, responseObj) {
    //handle
})
.always(function() {
    //handle
});
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
var filter = encodeURI("?$filter=Title eq 'some title'");
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName + filter,
    type: "POST",
    cache: false,
    contentType: "text/xml; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "xml"
})
.done(function(xmlDoc, status, responseObj) {
    //handle
})
.fail(function(xmlDoc, status, responseObj) {
    //handle
})
.always(function() {
    //handle
});
added 96 characters in body
Source Link
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
var filter = encodeURI("?$filter=Title eq 'some title'");
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName + filter,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "application"text/json;xml; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "json""xml"
})
.done(function(xmlDoc, status, responseObj) {
    //handle
})
.fail(function(xmlDoc, status, responseObj) {
    //handle
})
.always(function() {
    //handle
});
//Old fashioned Web Service - works
var listName = "yourListName";
var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    contentType: "text/xml; charset='utf-8'",
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    }
    }).done(function(xDataxmlDoc, status, responseObj) {
        //handle
    })
    .fail(function(xDataxmlDoc, status, responseObj) {
        //handle
    })
    .always(function() {
        //handle
    });
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "application/json; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "json"
})
.done(function() {
    //handle
})
.fail(function() {
    //handle
})
.always(function() {
    //handle
});
//Old fashioned Web Service - works
var listName = "yourListName";
var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    contentType: "text/xml; charset='utf-8'",
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    }
    }).done(function(xData, status) {
        //handle
    })
    .fail(function(xData, status) {
        //handle
    })
    .always(function() {
        //handle
    });
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
var filter = encodeURI("?$filter=Title eq 'some title'");
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName + filter,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "text/xml; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "xml"
})
.done(function(xmlDoc, status, responseObj) {
    //handle
})
.fail(function(xmlDoc, status, responseObj) {
    //handle
})
.always(function() {
    //handle
});
var listName = "yourListName";
var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    }
    }).done(function(xmlDoc, status, responseObj) {
        //handle
    })
    .fail(function(xmlDoc, status, responseObj) {
        //handle
    })
    .always(function() {
        //handle
    });
added 284 characters in body
Source Link
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
$.ajax({
    url: http"http://yoursharepointsite.com/_vti_bin/listdata.svc/<listName>" + listName,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "application/json; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "json",
})
.done(function() {
   success: onSuccess,//handle
})
.fail(function() {
   error: onError//handle
})
.always(function() {
    //handle
});
//Old fashioned Web Service - works
var listName = "yourListName";
var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    contentType: "text/xml; charset='utf-8'",
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    },
    success: }).done(function (xData, status) {
        //handle
    },)
    error: .fail(function (xData, status) {
        //handle
    })
    .always(function() {
        //handle
    });
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+

$.ajax({
    url: http://yoursharepointsite.com/_vti_bin/listdata.svc/<listName>,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "application/json; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "json",
    success: onSuccess,
    error: onError
});
//Old fashioned Web Service - works

var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    contentType: "text/xml; charset='utf-8'",
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    },
    success: function (xData, status) {
        //handle
    },
    error: function (xData, status) {
        //handle
    }
});
$.ajax.support.cors = true; //enable CORS support, default is true in v1.9+
var listName = "Your List Name".replace(/\s/g, ''); //no white spaces
$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/listdata.svc/" + listName,
    method: "GET",  
    type: "POST",
    cache: false,
    contentType: "application/json; charset=utf-8",
    username: "username",
    password: "password",
    dataType: "json"
})
.done(function() {
    //handle
})
.fail(function() {
    //handle
})
.always(function() {
    //handle
});
//Old fashioned Web Service - works
var listName = "yourListName";
var packet = '<?xml version="1.0" encoding="utf-8"?>'+
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
'<soap:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>' + listName + '</listName></GetList></soap:Body></soap:Envelope>';

$.ajax({
    url: "http://yoursharepointsite.com/_vti_bin/lists.asmx",
    type: "POST",
    dataType: "xml",
    data: packet,
    contentType: "text/xml; charset='utf-8'",
    headers: {
        "SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
        "Content-Type": "text/xml; charset=utf-8"
    }
    }).done(function(xData, status) {
        //handle
    })
    .fail(function(xData, status) {
        //handle
    })
    .always(function() {
        //handle
    });
added 1531 characters in body
Source Link
Loading
Source Link
Loading