Skip to content
Snippets Groups Projects
Commit b7b20b66 authored by michael.minelli's avatar michael.minelli
Browse files

HttpManager => If data are empty, do not modify content-type

parent 270f2906
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,9 @@ class HttpManager { ...@@ -22,7 +22,9 @@ class HttpManager {
} }
if ( config.url && (config.url.indexOf(Config.apiURL) !== -1) ) { if ( config.url && (config.url.indexOf(Config.apiURL) !== -1) ) {
if ( config.data && Object.keys(config.data).length > 0 ) {
config.headers['Content-Type'] = 'multipart/form-data'; config.headers['Content-Type'] = 'multipart/form-data';
}
if ( SessionManager.isLogged ) { if ( SessionManager.isLogged ) {
config.headers.Authorization = 'Bearer ' + SessionManager.token; config.headers.Authorization = 'Bearer ' + SessionManager.token;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment