@sap_oss/odata-library
Version:
OData client for testing Netweawer OData services.
40 lines (28 loc) • 801 B
Markdown
A NodeJS library to access OData services provided by the Netweaver server.
NodeJS is installed. Minimum version of NodeJS is 18.
```shell
$ npm install @sap_oss/odata-library
```
```javascript
const Service = require("@sap_oss/odata-library").Service;
let service = new Service(
"https://username:password@localhost/path/to/service/"
);
service.init
.then(() => {
return service.Entity_Set_Name.get(1);
})
.then((result) => {
console.log(result);
});
```
"ca" parameter is not supported (due to use fetch instead of
superagent). Use environment variable `NODE_EXTRA_CA_CERTS`
to define custom certificate authority.
```
export NODE_EXTRA_CA_CERTS=[your CA certificate file path]
```