Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.94 KB

remote-services.md

File metadata and controls

55 lines (38 loc) · 1.94 KB
label synopsis status
Remote Services
Class `cds.RemoteService` is a service proxy class to consume remote services via different [protocols](protocols), like OData or plain REST.
released

Remote Services { .concept}

Class cds.RemoteService is a service proxy class to consume remote services via different protocols, like OData or plain REST.

cds.RemoteService class { #cds-remote-service}

class cds.RemoteService extends cds.Service

cds.RemoteService — Configuration {#remoteservice-configuration }

CSRF-Token Handling

If the remote system you want to consume requires it, you can enable the new CSRF-token handling of @sap-cloud-sdk/core via configuration options: csrf: true/false and csrfInBatch: true/false. These options allow to configure CSRF-token handling for each remote service separately. Global configuration cds.env.features.fetch_csrf = true is deprecated.

"cds": {
    "requires": {
        "API_BUSINESS_PARTNER": {
            "kind": "odata",
            "model": "srv/external/API_BUSINESS_PARTNER",
            "csrf": true,
            "csrfInBatch": true
        }
    }
}

::: tip See Using Destinations for more details on destination configuration. :::

More to Come

This documentation is not complete yet, or the APIs are not released for general availability. There's more to come in this place in upcoming releases.