Skip to content

Commit 2ea8b7f

Browse files
committed
replaced call to missing initParams function
1 parent e9f5bbe commit 2ea8b7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,12 @@ request.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
226226

227227
request.defaults = function (options, requester) {
228228
var def = function (method) {
229-
var d = function (uri, opts, callback) {
230-
var params = initParams(uri, opts, callback)
229+
var d = function (params, callback) {
230+
if(typeof params === 'string')
231+
params = {'uri': params};
232+
else {
233+
params = JSON.parse(JSON.stringify(params));
234+
}
231235
for (var i in options) {
232236
if (params.options[i] === undefined) params.options[i] = options[i]
233237
}

0 commit comments

Comments
 (0)