Socket
Socket
Sign inDemoInstall

gaxios

Package Overview
Dependencies
3
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

11

build/src/gaxios.js

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

const node_fetch_1 = require("node-fetch");
const qs = require("qs");
const qs = require("querystring");
const url_1 = require("url");

@@ -53,3 +53,3 @@ const common_1 = require("./common");

if (!opts.validateStatus(res.status)) {
throw new common_1.GaxiosError(data, opts, translatedResponse);
throw new common_1.GaxiosError(`Request failed with status code ${res.status}`, opts, translatedResponse);
}

@@ -114,3 +114,8 @@ return this.translateResponse(opts, res, data);

}
opts.body = opts.data;
opts.headers = opts.headers || {};
if (opts.data) {
opts.body = JSON.stringify(opts.data);
opts.headers['Content-Type'] = 'application/json';
delete opts.data;
}
opts.validateStatus = opts.validateStatus || this.validateStatus;

@@ -117,0 +122,0 @@ opts.responseType = opts.responseType || 'json';

{
"name": "gaxios",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple common HTTP client specifically for Google APIs and services.",

@@ -33,3 +33,2 @@ "main": "build/src/index.js",

"@types/node-fetch": "^2.1.2",
"@types/qs": "^6.5.1",
"assert-rejects": "^1.0.0",

@@ -48,4 +47,3 @@ "codecov": "^3.0.4",

"https-proxy-agent": "^2.2.1",
"node-fetch": "^2.2.0",
"qs": "^6.5.2"
"node-fetch": "^2.2.0"
},

@@ -52,0 +50,0 @@ "nyc": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc