Make it possible to return custom content-type and data with

webhook
This commit is contained in:
Jan Oberhauser
2019-10-16 14:01:39 +02:00
parent 1173c998fc
commit ded2152d61
3 changed files with 87 additions and 12 deletions

View File

@@ -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.',
},
],
},
],
};