🐛 Fixes issue that set content-type when downloading a file

This commit is contained in:
ricardo 2021-11-12 10:43:39 -05:00
parent ba8c922604
commit 4b1bcc17a2

View file

@ -864,8 +864,10 @@ export class HttpRequest implements INodeType {
if (requestOptions.headers === undefined) {
requestOptions.headers = {};
}
if (['POST', 'PUT', 'PATCH'].includes(requestMethod)) {
requestOptions.headers['Content-Type'] = 'application/json';
}
}
} else if (options.bodyContentType === 'raw') {
requestOptions.json = false;
} else {