diff --git a/lib/loggly/common.js b/lib/loggly/common.js index 58d3db1..dbc09d1 100644 --- a/lib/loggly/common.js +++ b/lib/loggly/common.js @@ -144,7 +144,7 @@ common.loggly = function () { } } var requestOptions = { - uri: (isBulk && headers['X-LOGGLY-TAG']) ? uri + '/tag/' + headers['X-LOGGLY-TAG'] : uri, + url: (isBulk && headers['X-LOGGLY-TAG']) ? uri + '/tag/' + headers['X-LOGGLY-TAG'] : uri, method: method, headers: isBulk ? {} : headers || {}, // Set headers empty for bulk proxy: proxy, @@ -233,12 +233,12 @@ common.loggly = function () { // Join Array Message with new line ('\n') character // if (arrMsg.length) { - requestOptions.body = arrMsg.join('\n'); + requestOptions.data = arrMsg.join('\n'); arrMsg.length = 0; } try { // eslint-disable-next-line no-unused-vars - axios(uri, requestOptions).then(function(res){ + axios(requestOptions).then(function(res){ const responseCode = res.status; if (responseCode === httpStatusCode.badToken.code) { isValidToken = false;