4.8.1 • Published 6 months ago

@amag-ch/cds-remote v4.8.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

npm version npm downloads

Wrapper for communication with external http services

Table of Contents

Installing

Using npm:

$ npm install @amag-ch/cds-remote

Using yarn:

$ yarn add @amag-ch/cds-remote

Configuration

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')

License

MIT

4.8.1

6 months ago

4.8.0

7 months ago

4.7.1

7 months ago

4.7.0

7 months ago

4.6.0

7 months ago

4.5.0

7 months ago

4.4.0

7 months ago