@amag-ch/sap_cap_common_http
v4.3.0
Published
Wrapper for communication with external http services
Readme
Wrapper for communication with external http services
Table of Contents
Installing
Using npm:
$ npm install @amag-ch/sap_cap_common_httpUsing yarn:
$ yarn add @amag-ch/sap_cap_common_httpConfiguration
Simple configuration over cds requires
{
"cds": {
"requires": {
"remote-service": {
"kind": "odata-v4",
"credentials": {
"destination": "remote-service-destination"
}
}
}
}
}Read configuration in implementation
const remoteService = await cds.connect.to('remote-service')
const baseUrl = await remoteService.getBaseUrl()
const configuration = await remoteService.getConfiguration()Implementation
const remoteService = await cds.connect.to('remote-service')
const response = await remoteService.get('/Ressource')