Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/axios-extension

Package Overview
Dependencies
Maintainers
3
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/axios-extension - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

12

dist/auth/connection.js

@@ -147,3 +147,3 @@ "use strict";

const oneTimeRespInterceptorId = provider.interceptors.response.use((response) => {
var _a, _b, _c, _d;
var _a, _b, _c;
if (response.status === 401) {

@@ -163,12 +163,2 @@ throw new error_1.ConnectionError(response.statusText, response);

if ((_c = response.headers) === null || _c === void 0 ? void 0 : _c[CSRF.ResponseHeaderName]) {
provider.defaults.headers = (_d = provider.defaults.headers) !== null && _d !== void 0 ? _d : {
common: {},
// eslint-disable-next-line quote-props
delete: {},
put: {},
get: {},
post: {},
head: {},
patch: {}
};
provider.defaults.headers.common[CSRF.RequestHeaderName] =

@@ -175,0 +165,0 @@ response.headers[CSRF.ResponseHeaderName];

19

dist/factory.js

@@ -30,3 +30,3 @@ "use strict";

function createInstance(ProviderType, config) {
var _a;
var _a, _b;
const providerConfig = lodash_clonedeep_1.default(config);

@@ -39,4 +39,14 @@ providerConfig.httpsAgent = new https_1.Agent({

const instance = new ProviderType(providerConfig);
instance.defaults.headers = (_a = instance.defaults.headers) !== null && _a !== void 0 ? _a : {
common: {},
// eslint-disable-next-line quote-props
delete: {},
put: {},
get: {},
post: {},
head: {},
patch: {}
};
auth_1.attachConnectionHandler(instance);
if ((_a = providerConfig.auth) === null || _a === void 0 ? void 0 : _a.password) {
if ((_b = providerConfig.auth) === null || _b === void 0 ? void 0 : _b.password) {
auth_1.attachBasicAuthInterceptor(instance);

@@ -113,5 +123,4 @@ }

const oneTimeReqInterceptorId = provider.interceptors.request.use((request) => __awaiter(this, void 0, void 0, function* () {
const url = new URL(provider.defaults.baseURL);
url.username = yield btp_utils_1.getUserForDestinationService(destinationServiceInstance);
request.baseURL = provider.defaults.baseURL = url.toString();
const credentials = yield btp_utils_1.getCredentialsForDestinationService(destinationServiceInstance);
provider.defaults.headers.common[btp_utils_1.BAS_DEST_INSTANCE_CRED_HEADER] = credentials;
provider.interceptors.request.eject(oneTimeReqInterceptorId);

@@ -118,0 +127,0 @@ return request;

{
"name": "@sap-ux/axios-extension",
"version": "0.5.0",
"version": "0.5.1",
"description": "Extension of the Axios module adding convinience methods to interact with SAP systems especially with OData services.",

@@ -17,3 +17,3 @@ "repository": {

"dependencies": {
"@sap-ux/btp-utils": "0.9.0",
"@sap-ux/btp-utils": "0.9.1",
"@sap-ux/logger": "0.1.5",

@@ -20,0 +20,0 @@ "axios": "0.24.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc