Skip to content

Commit

Permalink
Support customizing query string in redux-resource-xhr
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesplease committed Oct 20, 2017
1 parent 3f0a9a4 commit 117ca3e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/redux-resource-xhr/src/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ import qs from 'querystringify';
// 2. Pass a `qs` option for query string support

function buildUrl(uri, options) {
let qsStringify = options.qsStringify || qs.stringify;
if (options.qs) {
uri += qs.stringify(options.qs, true);
let stringified = qsStringify(options.qs, options.qsStringifyOptions);
if (stringified[0] !== '?') {
stringified = `?${stringified}`;
}
uri += stringified;
}
return uri;
}
Expand Down

0 comments on commit 117ca3e

Please sign in to comment.