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

Commit

Permalink
Build 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinBressan committed Oct 12, 2015
1 parent 7561b5d commit c545a92
Show file tree
Hide file tree
Showing 8 changed files with 1,196 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "restful.js",
"version": "0.9.1",
"version": "0.9.2",
"homepage": "https://github.com/marmelab/restful.js",
"authors": [
"Robin Bressan <[email protected]>"
Expand Down
11 changes: 10 additions & 1 deletion dist/es5/http/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Object.defineProperty(exports, '__esModule', {
value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _qs = require('qs');

var _qs2 = _interopRequireDefault(_qs);

exports['default'] = function (fetch) {
return function (config) {
var url = config.url;
Expand All @@ -14,7 +20,10 @@ exports['default'] = function (fetch) {
delete config.data;
}

return fetch(url, config).then(function (response) {
var queryString = _qs2['default'].stringify(config.params || {}, { arrayFormat: 'brackets' });
delete config.params;

return fetch(!queryString.length ? url : url + '?' + queryString, config).then(function (response) {
return (response.status === 204 ? Promise.resolve(null) : response.json()).then(function (json) {
var headers = {};

Expand Down
1 change: 0 additions & 1 deletion dist/es5/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var _modelScope2 = _interopRequireDefault(_modelScope);
exports['default'] = function (baseUrl, httpBackend) {
var rootScope = (0, _modelScope2['default'])();
rootScope.assign('config', 'entityIdentifier', 'id');
rootScope.set('debug', false);
if (!baseUrl && typeof window !== undefined && window.location) {
rootScope.set('url', window.location.protocol + '//' + window.location.host);
} else {
Expand Down
Loading

0 comments on commit c545a92

Please sign in to comment.