mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
remove content-type for form_data. browser will automatically set it NO_CI
This commit is contained in:
parent
126cb24688
commit
91d43a63af
|
|
@ -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']
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user