volos-analytics-apigee
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -28,3 +28,3 @@ /**************************************************************************** | ||
var onFinished = require('on-finished'); | ||
var superagent = require('superagent'); | ||
var request = require('request'); | ||
@@ -85,3 +85,3 @@ var MICROGATEWAY = 'microgateway'; | ||
function sendResponse(err, resp) { | ||
if (err || resp.statusCode != 200) { | ||
if (err || resp.statusCode !== 200) { | ||
cb(err || new Error('error from server: ' + resp.statusCode), recordsToBeUploaded); | ||
@@ -152,16 +152,23 @@ } else { | ||
var req = superagent.post(this.uri); | ||
var options = { | ||
url: this.uri, | ||
headers: {}, | ||
json: data | ||
}; | ||
if (this.microgateway) { | ||
req.auth(this.key, this.secret); | ||
options.auth = { | ||
user: this.key, | ||
pass: this.secret, | ||
sendImmediately: false | ||
} | ||
} else { | ||
req.set('x-DNA-Api-Key', this.key); | ||
options.headers['x-DNA-Api-Key'] = this.key; | ||
} | ||
if (this.compress) { | ||
req.set('Content-Encoding', 'gzip'); | ||
options.headers['Content-Encoding'] = 'gzip'; | ||
} | ||
req | ||
.send(data) | ||
.end(cb); | ||
request.post(options, cb); | ||
}; |
{ | ||
"name": "volos-analytics-apigee", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"main": "lib/apigeeanalytics.js", | ||
@@ -13,5 +13,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"debug": "1.0.x", | ||
"on-finished": "~2.2.1", | ||
"debug": "1.0.x", | ||
"superagent": "0.x.x", | ||
"request": "^2.6.0", | ||
"volos-analytics-common": "0.2.x" | ||
@@ -18,0 +18,0 @@ }, |
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
13043
269
+ Addedrequest@^2.6.0
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
- Removedsuperagent@0.x.x
- Removedasync@0.9.2(transitive)
- Removedcombined-stream@0.0.7(transitive)
- Removedcomponent-emitter@1.1.2(transitive)
- Removedcookiejar@2.0.1(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddelayed-stream@0.0.5(transitive)
- Removedextend@1.2.1(transitive)
- Removedform-data@0.1.3(transitive)
- Removedformidable@1.0.14(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmethods@1.0.1(transitive)
- Removedmime@1.2.11(transitive)
- Removedqs@1.2.0(transitive)
- Removedreadable-stream@1.0.27-1(transitive)
- Removedreduce-component@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedsuperagent@0.21.0(transitive)