From b3c1310a8e418933cd1de3438b5910bdc5c4de9f Mon Sep 17 00:00:00 2001 From: Julien Durillon Date: Mon, 6 Jan 2020 22:00:05 +0100 Subject: [PATCH] 'DELETE' does not send body. As for GET, the DELETE method is not really expected to send a body. Or at least, the Intercom API expects query params when issuing DELETE requests. --- lib/intercom.io.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/intercom.io.js b/lib/intercom.io.js index a848711..914134d 100644 --- a/lib/intercom.io.js +++ b/lib/intercom.io.js @@ -97,7 +97,7 @@ Intercom.prototype.request = function(method, path, parameters, cb) { timeout: this.options.timeout }; - if (method === 'GET') { + if (method === 'GET' || method === 'DELETE') { requestOptions.qs = parameters; requestOptions.headers = { 'Accept': 'application/json'