mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +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') {
|
if (responseFormat === 'file') {
|
||||||
requestOptions.encoding = null;
|
requestOptions.encoding = null;
|
||||||
|
|
||||||
|
if (options.bodyContentType !== 'raw') {
|
||||||
requestOptions.body = JSON.stringify(requestOptions.body);
|
requestOptions.body = JSON.stringify(requestOptions.body);
|
||||||
if (requestOptions.headers === undefined) {
|
if (requestOptions.headers === undefined) {
|
||||||
requestOptions.headers = {};
|
requestOptions.headers = {};
|
||||||
}
|
}
|
||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user