Socket
Socket
Sign inDemoInstall

gaxios

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaxios - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

3

build/src/common.d.ts

@@ -32,2 +32,5 @@ /// <reference types="node" />

params?: any;
paramsSerializer?: (params: {
[index: string]: string | number;
}) => string;
timeout?: number;

@@ -34,0 +37,0 @@ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'stream';

@@ -29,3 +29,8 @@ import { GaxiosOptions, GaxiosPromise } from './common';

private validateStatus;
/**
* Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo)
* @param params key value pars to encode
*/
private paramsSerializer;
private translateResponse;
}

@@ -109,2 +109,3 @@ "use strict";

opts.validateStatus = opts.validateStatus || this.validateStatus;
opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer;
opts.responseType = opts.responseType || 'json';

@@ -117,3 +118,3 @@ if (!opts.headers['Accept'] && opts.responseType === 'json') {

const parts = new url_1.URL(opts.url);
parts.search = qs.stringify(opts.params);
parts.search = opts.paramsSerializer(opts.params);
opts.url = parts.href;

@@ -141,2 +142,9 @@ }

}
/**
* Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo)
* @param params key value pars to encode
*/
paramsSerializer(params) {
return qs.stringify(params);
}
translateResponse(opts, res, data) {

@@ -143,0 +151,0 @@ // headers need to be converted from a map to an obj

2

package.json
{
"name": "gaxios",
"version": "1.1.1",
"version": "1.2.0",
"description": "A simple common HTTP client specifically for Google APIs and services.",

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

@@ -65,2 +65,9 @@ # gaxios

// By default, we use the `querystring` package in node core to serialize
// querystring parameters. You can override that and provide your
// own implementation.
paramsSerializer: (params) => {
return qs.stringify(params);
},
// The timeout for the HTTP request. Defaults to 0.

@@ -67,0 +74,0 @@ timeout: 1000,

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