mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
🐛 Fixes issue that set content-type when downloading a file
This commit is contained in:
@@ -864,8 +864,10 @@ export class HttpRequest implements INodeType {
|
|||||||
if (requestOptions.headers === undefined) {
|
if (requestOptions.headers === undefined) {
|
||||||
requestOptions.headers = {};
|
requestOptions.headers = {};
|
||||||
}
|
}
|
||||||
|
if (['POST', 'PUT', 'PATCH'].includes(requestMethod)) {
|
||||||
requestOptions.headers['Content-Type'] = 'application/json';
|
requestOptions.headers['Content-Type'] = 'application/json';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (options.bodyContentType === 'raw') {
|
} else if (options.bodyContentType === 'raw') {
|
||||||
requestOptions.json = false;
|
requestOptions.json = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -918,7 +920,7 @@ export class HttpRequest implements INodeType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.sendMessageToUI(sendRequest);
|
this.sendMessageToUI(sendRequest);
|
||||||
} catch (e) {}
|
} catch (e) { }
|
||||||
|
|
||||||
// Now that the options are all set make the actual http request
|
// Now that the options are all set make the actual http request
|
||||||
if (oAuth1Api !== undefined) {
|
if (oAuth1Api !== undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user