diff --git a/dist/sanji-rest-ui.js b/dist/sanji-rest-ui.js index 5ef04f1..c9d9a77 100644 --- a/dist/sanji-rest-ui.js +++ b/dist/sanji-rest-ui.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular"),require("ng-file-upload")):"function"==typeof define&&define.amd?define(["angular","ng-file-upload"],t):"object"==typeof exports?exports.sjRest=t(require("angular"),require("ng-file-upload")):e.sjRest=t(e.angular,e.ngFileUpload)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n (https://github.com/zack9433)", "description": "sanji-rest-ui UI", - "version": "1.4.0", + "version": "1.4.1", "main": "dist/sanji-rest-ui.js", "config": { "ghooks": { diff --git a/src/component/restful.provider.js b/src/component/restful.provider.js index 3afaf7d..68e4885 100644 --- a/src/component/restful.provider.js +++ b/src/component/restful.provider.js @@ -88,9 +88,11 @@ class RestProvider { if (verb.match(/delete/)) { reqConfig.data = data; - reqConfig.headers = { - 'Content-Type': 'application/json' - }; + if (reqConfig.headers) { + reqConfig.headers['Content-Type'] = 'application/json'; + } else { + reqConfig.headers = { 'Content-Type': 'application/json' }; + } } args.push(reqConfig);