mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -08:00
🐛 Fixes issue that set content-type when downloading a file
This commit is contained in:
parent
ba8c922604
commit
4b1bcc17a2
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue