remove content-type for form_data. browser will automatically set it NO_CI

This commit is contained in:
Dennis Eichhorn 2020-06-18 19:39:44 +02:00
parent 126cb24688
commit 91d43a63af

View File

@ -34,6 +34,9 @@ export class Request
this.data = {};
this.requestHeader['Content-Type'] = this.setContentTypeBasedOnType(this.type);
if (this.type === RequestType.FORM_DATA) {
delete this.requestHeader['Content-Type']
}
this.result[0] = function(xhr)
{
@ -304,6 +307,10 @@ export class Request
{
this.type = type;
this.requestHeader['Content-Type'] = this.setContentTypeBasedOnType(this.type);
if (this.type === RequestType.FORM_DATA) {
delete this.requestHeader['Content-Type']
}
};
/**