mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
🐛 Fixes issue that set content-type when downloading a file
This commit is contained in:
parent
ba8c922604
commit
4b1bcc17a2
|
@ -864,7 +864,9 @@ export class HttpRequest implements INodeType {
|
|||
if (requestOptions.headers === undefined) {
|
||||
requestOptions.headers = {};
|
||||
}
|
||||
requestOptions.headers['Content-Type'] = 'application/json';
|
||||
if (['POST', 'PUT', 'PATCH'].includes(requestMethod)) {
|
||||
requestOptions.headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
}
|
||||
} else if (options.bodyContentType === 'raw') {
|
||||
requestOptions.json = false;
|
||||
|
@ -918,7 +920,7 @@ export class HttpRequest implements INodeType {
|
|||
};
|
||||
}
|
||||
this.sendMessageToUI(sendRequest);
|
||||
} catch (e) {}
|
||||
} catch (e) { }
|
||||
|
||||
// Now that the options are all set make the actual http request
|
||||
if (oAuth1Api !== undefined) {
|
||||
|
|
Loading…
Reference in a new issue