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

@adobe/fetch

Package Overview
Dependencies
Maintainers
58
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/fetch - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

7

index.js

@@ -43,3 +43,8 @@ /*

function capFirst(s) {
return s[0].toUpperCase() + s.slice(1);
}
function addAuthHeaders(token, options, authOptions) {
const tokenType = capFirst(token.token_type);
let apiKey = authOptions.clientId;

@@ -59,3 +64,3 @@ let xrequestid = uuid().replace(/-/g, '');

headers: {
authorization: `${token.token_type} ${token.access_token}`,
authorization: `${tokenType} ${token.access_token}`,
'x-api-key': apiKey,

@@ -62,0 +67,0 @@ 'x-request-id': xrequestid,

2

package.json
{
"name": "@adobe/fetch",
"version": "0.2.0",
"version": "0.2.1",
"description": "Call Adobe APIs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,3 +30,3 @@ /*

expect(options.headers).toBeDefined();
expect(options.headers['authorization']).toBe(`bearer ${access_token}`);
expect(options.headers['authorization']).toBe(`Bearer ${access_token}`);
expect(options.headers['x-api-key']).toBe(apikey);

@@ -33,0 +33,0 @@ expect(options.headers['x-gw-ims-org-id']).toBe(orgid);

@@ -77,3 +77,3 @@ /*

expect(options.headers['authorization']).toBe(
`${token.token_type} ${token.access_token}`
`Bearer ${token.access_token}`
);

@@ -106,3 +106,3 @@ return Promise.resolve(mockData.responseOK);

expect(options.headers['authorization']).toBe(
`${token.token_type} ${token.access_token}`
`Bearer ${token.access_token}`
);

@@ -109,0 +109,0 @@ return Promise.resolve(mockData.responseOK);

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