Skip to content

Commit b2353fb

Browse files
committed
fixes colynb#5 ... don't assume everything is json
1 parent efcd601 commit b2353fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ var makeRequest = function(method, options, params, callback) {
3939
});
4040

4141
options.agent = keepaliveAgent;
42-
options.json = params;
42+
43+
if (typeof params == "string")
44+
options.body = params;
45+
else
46+
options.json = params;
47+
4348
request(options, $);
4449
}
4550

0 commit comments

Comments
 (0)