mailgun.js
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -6,2 +6,3 @@ export default interface Options { | ||
public_key?: string; | ||
timeout?: number; | ||
} |
@@ -6,2 +6,3 @@ import RequestOptions from './interfaces/RequestOptions'; | ||
private url; | ||
private timeout; | ||
private headers; | ||
@@ -8,0 +9,0 @@ private formData; |
/*! MIT License © Sindre Sorhus */ | ||
/*! mailgun.js v3.3.0 */ | ||
/*! mailgun.js v3.3.1 */ |
const fs = require('fs'); | ||
const mailgun = require('../index'); | ||
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY || '' }); | ||
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY || '', timeout: 60000 }); | ||
@@ -6,0 +6,0 @@ const domain = 'sandbox-123.mailgun.com'; |
@@ -6,2 +6,3 @@ export default interface Options { | ||
public_key?: string; | ||
timeout?: number; | ||
} |
@@ -41,2 +41,3 @@ | ||
private url; | ||
private timeout; | ||
private headers: any; | ||
@@ -49,2 +50,3 @@ private formData: new () => FormData; | ||
this.url = options.url; | ||
this.timeout = options.timeout; | ||
this.headers = options.headers || {}; | ||
@@ -82,2 +84,3 @@ this.formData = formData; | ||
throwHttpErrors: false, | ||
timeout: this.timeout, | ||
...params | ||
@@ -84,0 +87,0 @@ } |
{ | ||
"name": "mailgun.js", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"main": "dist/mailgun.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -20,3 +20,3 @@ const formData = require('form-data'); | ||
beforeEach(function () { | ||
client = new Client({ username: 'username', key: 'key', public_key: 'key' }, formData); | ||
client = new Client({ username: 'username', key: 'key', public_key: 'key', timeout: 10000 }, formData); | ||
}); | ||
@@ -23,0 +23,0 @@ |
@@ -43,3 +43,4 @@ // jscs:disable requireDotNotation | ||
url: 'https://api.mailgun.com', | ||
headers: { 'X-CSRF-Token': 'protectme' } | ||
headers: { 'X-CSRF-Token': 'protectme' }, | ||
timeout: 10000 | ||
}, formData); | ||
@@ -46,0 +47,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1851174
279506
3232