mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
delete header in some special cases
This commit is contained in:
parent
91d43a63af
commit
27470758e7
|
|
@ -35,7 +35,7 @@ export class Request
|
|||
|
||||
this.requestHeader['Content-Type'] = this.setContentTypeBasedOnType(this.type);
|
||||
if (this.type === RequestType.FORM_DATA) {
|
||||
delete this.requestHeader['Content-Type']
|
||||
delete this.requestHeader['Content-Type'];
|
||||
}
|
||||
|
||||
this.result[0] = function(xhr)
|
||||
|
|
@ -197,6 +197,10 @@ export class Request
|
|||
setRequestHeader(type, header)
|
||||
{
|
||||
this.requestHeader[type] = header;
|
||||
|
||||
if (header === 'multipart/form-data') {
|
||||
delete this.requestHeader[type];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -309,7 +313,7 @@ export class Request
|
|||
this.requestHeader['Content-Type'] = this.setContentTypeBasedOnType(this.type);
|
||||
|
||||
if (this.type === RequestType.FORM_DATA) {
|
||||
delete this.requestHeader['Content-Type']
|
||||
delete this.requestHeader['Content-Type'];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user