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',
|
name: 'HEAD',
|
||||||
value: 'HEAD'
|
value: 'HEAD'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'PATCH',
|
||||||
|
value: 'PATCH'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'POST',
|
name: 'POST',
|
||||||
value: 'POST'
|
value: 'POST'
|
||||||
@@ -213,6 +217,7 @@ export class HttpRequest implements INodeType {
|
|||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/requestMethod': [
|
'/requestMethod': [
|
||||||
|
'PATCH',
|
||||||
'POST',
|
'POST',
|
||||||
'PUT',
|
'PUT',
|
||||||
],
|
],
|
||||||
@@ -345,6 +350,7 @@ export class HttpRequest implements INodeType {
|
|||||||
true,
|
true,
|
||||||
],
|
],
|
||||||
requestMethod: [
|
requestMethod: [
|
||||||
|
'PATCH',
|
||||||
'POST',
|
'POST',
|
||||||
'PUT',
|
'PUT',
|
||||||
],
|
],
|
||||||
@@ -367,6 +373,7 @@ export class HttpRequest implements INodeType {
|
|||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
requestMethod: [
|
requestMethod: [
|
||||||
|
'PATCH',
|
||||||
'POST',
|
'POST',
|
||||||
'PUT',
|
'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
|
// 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') {
|
if (options.bodyContentType === 'multipart-form-data') {
|
||||||
requestOptions.formData = requestOptions.body;
|
requestOptions.formData = requestOptions.body;
|
||||||
delete requestOptions.body;
|
delete requestOptions.body;
|
||||||
|
|||||||
Reference in New Issue
Block a user