🔀 Merge branch 'fix/http-request-node'

This commit is contained in:
Jan Oberhauser 2021-11-19 10:23:13 +01:00
commit b31820e7a0

View file

@ -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 {