mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08: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;
|
||||
|
||||
if (options.bodyContentType !== 'raw') {
|
||||
requestOptions.body = JSON.stringify(requestOptions.body);
|
||||
if (requestOptions.headers === undefined) {
|
||||
requestOptions.headers = {};
|
||||
}
|
||||
requestOptions.headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
} else if (options.bodyContentType === 'raw') {
|
||||
requestOptions.json = false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue