From 53cc89c9e6096a6456300dde79936a12da0c12ac Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 4 Sep 2018 17:53:19 -0400 Subject: [PATCH] feat: use small HTTP dependency (#93) --- packages/google-cloud-dns/package.json | 4 ++-- packages/google-cloud-dns/src/change.js | 4 ++-- packages/google-cloud-dns/src/index.js | 4 ++-- packages/google-cloud-dns/src/zone.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-dns/package.json b/packages/google-cloud-dns/package.json index 996da7e37b3..a3ed41b5d24 100644 --- a/packages/google-cloud-dns/package.json +++ b/packages/google-cloud-dns/package.json @@ -64,8 +64,8 @@ "lodash.groupby": "^4.6.0", "methmeth": "^1.1.0", "propprop": "^0.3.1", - "request": "^2.88.0", - "string-format-obj": "^1.1.1" + "string-format-obj": "^1.1.1", + "teeny-request": "^3.6.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", diff --git a/packages/google-cloud-dns/src/change.js b/packages/google-cloud-dns/src/change.js index 81f3e66cc70..3e82df69521 100644 --- a/packages/google-cloud-dns/src/change.js +++ b/packages/google-cloud-dns/src/change.js @@ -16,7 +16,7 @@ 'use strict'; -const request = require('request'); +const teenyRequest = require('teeny-request').teenyRequest; const {ServiceObject} = require('@google-cloud/common'); const {promisifyAll} = require('@google-cloud/promisify'); @@ -180,7 +180,7 @@ class Change extends ServiceObject { */ id: id, methods: methods, - requestModule: request, + requestModule: teenyRequest, }); } /** diff --git a/packages/google-cloud-dns/src/index.js b/packages/google-cloud-dns/src/index.js index a91a7c41002..08117545326 100644 --- a/packages/google-cloud-dns/src/index.js +++ b/packages/google-cloud-dns/src/index.js @@ -22,7 +22,7 @@ const {paginator} = require('@google-cloud/paginator'); const {promisifyAll} = require('@google-cloud/promisify'); const extend = require('extend'); const is = require('is'); -const request = require('request'); +const teenyRequest = require('teeny-request').teenyRequest; const Zone = require('./zone'); @@ -89,7 +89,7 @@ class DNS extends Service { 'https://www.googleapis.com/auth/cloud-platform', ], packageJson: require('../package.json'), - requestModule: request, + requestModule: teenyRequest, }; super(config, options); } diff --git a/packages/google-cloud-dns/src/zone.js b/packages/google-cloud-dns/src/zone.js index 78f26fe9aa6..3bbbf318304 100644 --- a/packages/google-cloud-dns/src/zone.js +++ b/packages/google-cloud-dns/src/zone.js @@ -27,7 +27,7 @@ const fs = require('fs'); const groupBy = require('lodash.groupby'); const is = require('is'); const prop = require('propprop'); -const request = require('request'); +const teenyRequest = require('teeny-request').teenyRequest; const zonefile = require('dns-zonefile'); const Change = require('./change'); @@ -212,7 +212,7 @@ class Zone extends ServiceObject { id: name, createMethod: dns.createZone.bind(dns), methods: methods, - requestModule: request, + requestModule: teenyRequest, }); /** * @name Zone#name