Add native fetch client section for remote service consumption#2519
Open
Add native fetch client section for remote service consumption#2519
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: |
Contributor
There was a problem hiding this comment.
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: |
|
|
||
| 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. |
Contributor
There was a problem hiding this comment.
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. |
| 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. |
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.