Closed arunagnihotri closed 5 years ago
mh, which version are you refering to.
Latest version 1.0.0 should work, but there is no.config
anymore. Here is a snipped how it works now:
const odata = require('odata');
const oHandler = odata.o('https://services.odata.org/V4/%28S%28wptr35qf3bz4kb5oatn432ul%29%29/TripPinServiceRW/', {
headers: {
'If-Match': '*'
}
});
oHandler.get('People').query().then((data) => {
console.log(data);
});
Thanks. I'll try and let you know.
works now (on Node 11). Thanks for your prompt response.
Hi, does it compile successfully or work on nodejs 11? I am getting an error at o().config({...}) TypeError: o is not a function
Here is the piece of code I am trying: `'use strict';
let o = require('o.js'); let request = require('request');
// You credential let Credentials = require('./crendentials');
// Your host let sUrl = "http://:/sap/opu/odata/sap/processmanagement/";
// Retrieve the data o().config({ version: 4, username: Credentials.username, password: Credentials.password, endpoint: sUrl });`