Skip to content

Commit 23e2197

Browse files
committed
[countly-request] Add default config to get and post methods
1 parent 646e613 commit 23e2197

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/utils/countly-request/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ module.exports = function(countlyConfig) {
184184
}
185185

186186
// eslint-disable-next-line require-jsdoc
187-
function post(uri, options, callback, config) {
187+
function post(uri, options, callback, config = countlyConfig) {
188188
var params = initParams(uri, options, callback, config);
189189
if (params.options && (params.options.url || params.options.uri)) {
190190
if (params.options.form && params.options.form.fileStream && params.options.form.fileField) {
@@ -219,7 +219,7 @@ module.exports = function(countlyConfig) {
219219
}
220220

221221

222-
function get(uri, options, callback, config) {
222+
function get(uri, options, callback, config = countlyConfig) {
223223
requestFunction(uri, options, callback, config);
224224
}
225225

@@ -259,4 +259,4 @@ async function uploadFormFile(url, fileData, callback) {
259259

260260

261261

262-
module.exports.convertOptionsToGot = convertOptionsToGot;
262+
module.exports.convertOptionsToGot = convertOptionsToGot;

0 commit comments

Comments
 (0)