Node.JS Client for XSA Resource Access.
Access resources that are protected by XSUAA in HANA XSA using login credentials (technical user). Can be used as proxy along with express framework.
Installation:
npm i xsa_node_client
Usage Example:
var xsa_nc = require('xsa_node_client');
var opts = {
https: true,
host: 'hxehost',
port: '51121',
path: '/destination/hr/employee.xsodata/$metadata',
defaultXSAPorts: true,
user: 'test',
pass: 'dummy'
};
xsa_nc.getContent(opts,function(data){
/*
Callback response will contain
- data.res = Response Object
- data.body = Response Body
- data.err = Error
*/
console.log(data.body);
});
You can debug for errors by setting the DEBUG
environment variable.
Please note that this is an unofficial package. Developer is not liable for any risks/ damages caused thereby.