Skip to content

Commit 86fc4b4

Browse files
Rohit MishraRohit Mishra
authored andcommitted
updated in request file for react-native type
1 parent b0c4ffb commit 86fc4b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/lib/request.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default function Request(options) {
88
return new Promise(function(resolve, reject) {
99
let queryParams;
1010
let serialize = function(obj, prefix) {
11+
1112
let str = [],
1213
p;
1314
if (typeof obj === "object" && obj.length !== undefined) {
@@ -20,7 +21,7 @@ export default function Request(options) {
2021
v = obj[p];
2122
str.push((v !== null && typeof v === "object" && p !== 'query') ?
2223
serialize(v, k) :
23-
k + "=" + (p !== 'query' ? encodeURIComponent(v) : JSON.stringify(v)));
24+
k + "=" + encodeURIComponent(p !== 'query' ? v : JSON.stringify(v)));
2425
}
2526
}
2627
return str.join("&");

0 commit comments

Comments
 (0)