Add native fetch client section for remote service consumption#2519
Add native fetch client section for remote service consumption#2519schwma wants to merge 3 commits into
Conversation
|
|
||
| #### 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: |
There was a problem hiding this comment.
| 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: |
|
|
||
| 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. |
There was a problem hiding this comment.
| 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. |
| 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. |
There was a problem hiding this comment.
| 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. |
danjoa
left a comment
There was a problem hiding this comment.
This reads as if we had already released FetchAPI for productive use, but I think that's not the case yet, is it? → Let's discuss that in our syncs for cds10
It could be used in a productive use case if the named destinations does not need to be looked up via BTP Destination Service and the authentication type is |
No, we should keep the messages plain and simple:
|
No description provided.