mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Fix bug in HTTP Request node with raw data and file response
This commit is contained in:
@@ -813,11 +813,14 @@ export class HttpRequest implements INodeType {
|
||||
|
||||
if (responseFormat === 'file') {
|
||||
requestOptions.encoding = null;
|
||||
requestOptions.body = JSON.stringify(requestOptions.body);
|
||||
if (requestOptions.headers === undefined) {
|
||||
requestOptions.headers = {};
|
||||
|
||||
if (options.bodyContentType !== 'raw') {
|
||||
requestOptions.body = JSON.stringify(requestOptions.body);
|
||||
if (requestOptions.headers === undefined) {
|
||||
requestOptions.headers = {};
|
||||
}
|
||||
requestOptions.headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
requestOptions.headers['Content-Type'] = 'application/json';
|
||||
} else if (options.bodyContentType === 'raw') {
|
||||
requestOptions.json = false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user