Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit c545a92

Browse files
committed
Build 0.9.2
1 parent 7561b5d commit c545a92

8 files changed

+1196
-32
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "restful.js",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"homepage": "https://github.com/marmelab/restful.js",
55
"authors": [
66
"Robin Bressan <[email protected]>"

dist/es5/http/fetch.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Object.defineProperty(exports, '__esModule', {
44
value: true
55
});
66

7+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
8+
9+
var _qs = require('qs');
10+
11+
var _qs2 = _interopRequireDefault(_qs);
12+
713
exports['default'] = function (fetch) {
814
return function (config) {
915
var url = config.url;
@@ -14,7 +20,10 @@ exports['default'] = function (fetch) {
1420
delete config.data;
1521
}
1622

17-
return fetch(url, config).then(function (response) {
23+
var queryString = _qs2['default'].stringify(config.params || {}, { arrayFormat: 'brackets' });
24+
delete config.params;
25+
26+
return fetch(!queryString.length ? url : url + '?' + queryString, config).then(function (response) {
1827
return (response.status === 204 ? Promise.resolve(null) : response.json()).then(function (json) {
1928
var headers = {};
2029

dist/es5/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ var _modelScope2 = _interopRequireDefault(_modelScope);
3131
exports['default'] = function (baseUrl, httpBackend) {
3232
var rootScope = (0, _modelScope2['default'])();
3333
rootScope.assign('config', 'entityIdentifier', 'id');
34-
rootScope.set('debug', false);
3534
if (!baseUrl && typeof window !== undefined && window.location) {
3635
rootScope.set('url', window.location.protocol + '//' + window.location.host);
3736
} else {

0 commit comments

Comments
 (0)