Skip to content

Add native fetch client section for remote service consumption#2519

Open
schwma wants to merge 3 commits intomainfrom
native-fetch-client
Open

Add native fetch client section for remote service consumption#2519
schwma wants to merge 3 commits intomainfrom
native-fetch-client

Conversation

@schwma
Copy link
Copy Markdown
Contributor

@schwma schwma commented Apr 21, 2026

No description provided.

@schwma schwma requested review from danjoa and sjvans April 21, 2026 09:26
@schwma schwma marked this pull request as ready for review April 21, 2026 09:26
@schwma schwma requested a review from renejeglinsky as a code owner April 21, 2026 09:26
Comment thread guides/deploy/to-cf.md

#### Native Fetch Client <Beta /> {#native-fetch}

As an alternative to SAP Cloud SDK, CAP can use Node.js's built-in `fetch` API for remote service calls. Native fetch is selected per request based on the following rules, in that order:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As an alternative to SAP Cloud SDK, CAP can use Node.js's built-in `fetch` API for remote service calls. Native fetch is selected per request based on the following rules, in that order:
As an alternative to SAP Cloud SDK, CAP can use Node.js's built-in `fetch` API for remote service calls. Native fetch is selected per request based on the following rules:

Comment thread guides/deploy/to-cf.md

As an alternative to SAP Cloud SDK, CAP can use Node.js's built-in `fetch` API for remote service calls. Native fetch is selected per request based on the following rules, in that order:

1. If the destination requires features only available in CloudSDK (e.g., BTP Destination Service resolution or non-basic authentication), CloudSDK is always used.
Copy link
Copy Markdown
Contributor

@renejeglinsky renejeglinsky Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. If the destination requires features only available in CloudSDK (e.g., BTP Destination Service resolution or non-basic authentication), CloudSDK is always used.
1. If the destination requires features only available in SAP Cloud SDK (for example, SAP BTP Destination service resolution or non-basic authentication), the SAP Cloud SDK is always used.

Comment thread guides/deploy/to-cf.md
3. Otherwise, native fetch is used when `@sap-cloud-sdk/http-client` is not installed.

::: warning Current limitations
The native fetch client does not yet support named destinations via BTP Destination Service, only [application defined destinations](../services/consuming-services#use-application-defined-destinations). Authentication is limited to `NoAuthentication` and `BasicAuthentication`. CSRF token handling is not yet fully on par with SAP Cloud SDK.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The native fetch client does not yet support named destinations via BTP Destination Service, only [application defined destinations](../services/consuming-services#use-application-defined-destinations). Authentication is limited to `NoAuthentication` and `BasicAuthentication`. CSRF token handling is not yet fully on par with SAP Cloud SDK.
The native fetch client does not yet support named destinations using the SAP BTP Destination service. Only [application defined destinations](../services/consuming-services#use-application-defined-destinations) are supported. In addition, authentication is limited to `NoAuthentication` and `BasicAuthentication`. CSRF token handling is not yet at parity with SAP Cloud SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants