mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-27 23:07:12 +02:00
⚡ Fix bug in HTTP Request node with raw data and file response
This commit is contained in:
parent
f13a2781a6
commit
44100dc675
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user