AAE-30878 - reverted misplaced changes

This commit is contained in:
VitoAlbano
2025-08-19 17:44:14 +01:00
committed by Vito Albano
parent 508bb9a35f
commit 6fa531e11f

View File

@@ -176,12 +176,12 @@ export class SuperagentHttpClient implements HttpClient {
if (contentType && contentType !== 'multipart/form-data') {
request.type(contentType);
} else if (!request.header['Content-Type'] && contentType !== 'multipart/form-data') {
} else if (!(request as any).header['Content-Type'] && contentType !== 'multipart/form-data') {
request.type('application/json');
}
if (contentType === 'application/x-www-form-urlencoded') {
request.send(SuperagentHttpClient.normalizeParams(formParams)).on('progress', (event) => {
request.send(SuperagentHttpClient.normalizeParams(formParams)).on('progress', (event: any) => {
this.progress(event, eventEmitter);
});
} else if (contentType === 'multipart/form-data') {