I am trying to connect our company intranet to the sharepoint instance using node.js
Sharepoint is 2013, I am using example code that I found online, I try to catch all exceptions, however I get an exception when trying to connect:
"Cannot read property 'S:Fault' of undefined
Here is my code:
var SP = require("sharepoint"),
strSite = "http://ift.tt/1cybkxQ",
spCli = new SP.RestService(strSite),
strLogin = "domain/simon.platten",
strPassword = "mypassword",
lstAbsence = spCli.list("Holiday & Absence"),
showResponse = function(err, data) {
console.dir(err);
console.dir(data);
};
spCli.signin(strLogin, strPassword, function() {
try{
lstAbsence.get(showResponse);
} catch( ex ) {
console.log("Error during signin:" + ex);
}
});
Aucun commentaire:
Enregistrer un commentaire