Wrap axios to use the SAP Cloud Foundry destination Service. Version 1.0.2, maintained by Flexso (unofficial). Provides an axios instance configured for SAP BTP destinations, handling authentication (basic, OAuth2ClientCredentials, OAuth2SAMLBearerAssertion, OAuth2UserTokenExchange, principal propagation), proxy for on-premise, and automatic X-CSRF-Token fetching. Ships TypeScript types. Alternatives: @sap/xssec, @sap/cf-tokens, sap-cloud-sdk (official but heavier).
npm install sap-cf-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an axios instance for a named BTP destination and makes a GET request. Runs in Node.js with SAP Cloud Foundry environment.
Use require('sap-cf-axios').default instead of require('sap-cf-axios')Include the JWT token as authorization header in the request config.
Use SapCfAxios(destinationName, axiosConfig?, xsrfConfig?) - see README for correct usage.
Set xsrfHeaderName in the request config (not as a separate parameter) to enable automatic token fetch.
Use import SapCfAxios from 'sap-cf-axios' for ESM, or const SapCfAxios = require('sap-cf-axios').default for CommonJS.Run 'npm install sap-cf-axios' and ensure axios is also installed.
Verify destination name and that the app is bound to the destination service.
Ensure authorization header contains a valid JWT token.