mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
✨ Make it possible to return custom content-type and data with
webhook
This commit is contained in:
@@ -75,6 +75,8 @@ export class Webhook implements INodeType {
|
||||
responseMode: '={{$parameter["responseMode"]}}',
|
||||
responseData: '={{$parameter["responseData"]}}',
|
||||
responseBinaryPropertyName: '={{$parameter["responseBinaryPropertyName"]}}',
|
||||
responseContentType: '={{$parameter["options"]["responseContentType"]}}',
|
||||
responsePropertyName: '={{$parameter["options"]["responsePropertyName"]}}',
|
||||
path: '={{$parameter["path"]}}',
|
||||
},
|
||||
],
|
||||
@@ -203,6 +205,42 @@ export class Webhook implements INodeType {
|
||||
},
|
||||
description: 'Name of the binary property to return',
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
responseData: [
|
||||
'firstEntryJson',
|
||||
],
|
||||
responseMode: [
|
||||
'lastNode',
|
||||
],
|
||||
},
|
||||
},
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Response Content-Type',
|
||||
name: 'responseContentType',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'application/xml',
|
||||
description: 'Set a custom content-type to return if another one as the "application/json" should be returned.',
|
||||
},
|
||||
{
|
||||
displayName: 'Property Name',
|
||||
name: 'responsePropertyName',
|
||||
type: 'string',
|
||||
default: 'data',
|
||||
description: 'Name of the property to return the data of instead of the whole JSON.',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user