From b2a7b4057d8856b7cea88f36e123b57a46231c3b Mon Sep 17 00:00:00 2001 From: Stuart Macleod Date: Thu, 18 May 2023 15:24:34 -0700 Subject: [PATCH 1/2] Removing empty body default --- src/api.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index ad63773..36ec1ae 100644 --- a/src/api.js +++ b/src/api.js @@ -53,8 +53,7 @@ EdgeGrid.prototype.auth = function (req) { url: req.path, method: 'GET', headers: {}, - maxRedirects: 0, - body: '' + maxRedirects: 0 }); req.headers = helpers.extendHeaders(req.headers); From 80fc10e5f1584da95a8504dca140dd74ee47e013 Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Tue, 12 Sep 2023 10:37:40 +0200 Subject: [PATCH 2/2] Update test for empty body --- test/src/api_test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/api_test.js b/test/src/api_test.js index 436751d..4253825 100644 --- a/test/src/api_test.js +++ b/test/src/api_test.js @@ -280,8 +280,8 @@ describe('Api', function () { assert.strictEqual(this.api.request.method, 'GET'); }); - it('ensures a default empty body', function () { - assert.strictEqual(this.api.request.body, ''); + it('ensures a default undefined body', function () { + assert.strictEqual(this.api.request.body, undefined); }); it('ensures a url is properly declared', function () {