const SuiteRequest = require('escher-suiteapi-js');
const options = new SuiteRequest.Options('example.host.com', {
credentialScope: 'eu/service/ems_request'
});
const suiteRequest = SuiteRequest.create('escher.key', 'escher.secret', options);
const heroId = 1;
let response = await suiteRequest.get(`/heroes/${heroId}`);
console.log(response);
let response = await suiteRequest.post('/heroes', {
name: 'Captain America',
sex: 'male'
});
console.log(response);
arnaudbuchholz-sap / escher-suiteapi-js Goto Github PK
View Code? Open in Web Editor NEWThis project forked from emartech/escher-suiteapi-js
Escher request library for Escher authenticated API clients
License: MIT License