Skip to content

Commit

Permalink
Update Request.js
Browse files Browse the repository at this point in the history
the original _renderUrl() method will make the query string become longer and longer, so I write a fix for myself
SitePen#200
  • Loading branch information
itdpong authored May 25, 2017
1 parent a0e5169 commit 269229d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ define([
}

if (queryParams.length > 0) {
requestUrl += (this._targetContainsQueryString ? '&' : '?') + queryParams.join('&');
var url = requestUrl.substring(0,requestUrl.indexOf("?"));
var query = requestUrl.substring(requestUrl.indexOf("?") + 1, requestUrl.length);
query = ioQuery.queryToObject(query);
query2 = ioQuery.queryToObject(queryParams.join('&'));
requestUrl = url + '?' +ioQuery.objectToQuery(lang.mixin(query,query2));
}
return requestUrl;
},
Expand All @@ -293,4 +297,4 @@ define([
}
});

});
});

0 comments on commit 269229d

Please sign in to comment.