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

mailgun.js

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun.js - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

dist/mailgun.js.LICENSE.txt
/*! MIT License © Sindre Sorhus */
/*! mailgun.js v3.1.0 */
/*! mailgun.js v3.1.1 */
import Btoa from 'btoa';
import merge from 'lodash.merge';
import urljoin from 'url-join';
import ky from 'ky-universal';

@@ -48,8 +45,15 @@

const basic = Btoa(`${this.username}:${this.key}`);
const headers = merge({
Authorization: `Basic ${basic}`
}, this.headers, options?.headers);
const headers = {
Authorization: `Basic ${basic}`,
...this.headers,
...options?.headers
};
delete options?.headers;
if (!headers['Content-Type']) {
// for form-data it will be Null so we need to remove it
delete headers['Content-Type'];
}
const params = { ...options };

@@ -93,3 +97,2 @@

headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
// json: data,
body: data,

@@ -119,3 +122,3 @@ ...options

const formData: FormData = new (this.formData as any)();
const options: any = {
const params: any = {
headers: { 'Content-Type': null }

@@ -154,3 +157,3 @@ };

return this.command('post', url, formData, options);
return this.command('post', url, formData, params);
}

@@ -157,0 +160,0 @@

{
"name": "mailgun.js",
"version": "3.1.0",
"version": "3.1.1",
"main": "dist/mailgun.js",

@@ -39,3 +39,2 @@ "types": "dist/index.d.ts",

"lodash.map": "^4.6.0",
"lodash.merge": "^4.6.2",
"lodash.partialright": "^4.2.1",

@@ -55,3 +54,2 @@ "url": "^0.11.0",

"@types/lodash.map": "^4.6.13",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.partialright": "^4.2.6",

@@ -58,0 +56,0 @@ "@types/mocha": "^8.2.0",

Sorry, the diff of this file is too big to display

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