mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
✨ Make it possible to send Patch-Requests with HttpRequest-Node
This commit is contained in:
@@ -110,6 +110,10 @@ export class HttpRequest implements INodeType {
|
||||
name: 'HEAD',
|
||||
value: 'HEAD'
|
||||
},
|
||||
{
|
||||
name: 'PATCH',
|
||||
value: 'PATCH'
|
||||
},
|
||||
{
|
||||
name: 'POST',
|
||||
value: 'POST'
|
||||
@@ -213,6 +217,7 @@ export class HttpRequest implements INodeType {
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/requestMethod': [
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
],
|
||||
@@ -345,6 +350,7 @@ export class HttpRequest implements INodeType {
|
||||
true,
|
||||
],
|
||||
requestMethod: [
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
],
|
||||
@@ -367,6 +373,7 @@ export class HttpRequest implements INodeType {
|
||||
false,
|
||||
],
|
||||
requestMethod: [
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
],
|
||||
@@ -575,7 +582,7 @@ export class HttpRequest implements INodeType {
|
||||
}
|
||||
|
||||
// Change the way data get send in case a different content-type than JSON got selected
|
||||
if (['POST', 'PUT'].includes(requestMethod)) {
|
||||
if (['PATCH', 'POST', 'PUT'].includes(requestMethod)) {
|
||||
if (options.bodyContentType === 'multipart-form-data') {
|
||||
requestOptions.formData = requestOptions.body;
|
||||
delete requestOptions.body;
|
||||
|
||||
Reference in New Issue
Block a user