♻️ Import HTTP Verbs operations and fields
This commit is contained in:
		
					parent
					
						
							
								e123f16c42
							
						
					
				
			
			
				commit
				
					
						5909f4d124
					
				
			
		
					 1 changed files with 5 additions and 21 deletions
				
			
		|  | @ -1,6 +1,6 @@ | ||||||
| import { INodeType, INodeTypeDescription } from "n8n-workflow"; | import { INodeType, INodeTypeDescription } from "n8n-workflow"; | ||||||
|  | import { httpVerbOperations, httpVerbFields } from "./HttpVerbDescriptions"; | ||||||
| 
 | 
 | ||||||
| // Description of our Node
 |  | ||||||
| export class HttpBin implements INodeType { | export class HttpBin implements INodeType { | ||||||
| 	description: INodeTypeDescription = { | 	description: INodeTypeDescription = { | ||||||
| 		displayName: "HttpBin", | 		displayName: "HttpBin", | ||||||
|  | @ -23,7 +23,7 @@ export class HttpBin implements INodeType { | ||||||
| 			}, | 			}, | ||||||
| 		], | 		], | ||||||
| 		requestDefaults: { | 		requestDefaults: { | ||||||
| 			baseURL: "={{$credentials.domain}}", | 			baseURL: "https://httpbin.org", | ||||||
| 			url: "", | 			url: "", | ||||||
| 			headers: { | 			headers: { | ||||||
| 				Accept: "application/json", | 				Accept: "application/json", | ||||||
|  | @ -44,7 +44,7 @@ export class HttpBin implements INodeType { | ||||||
| 				noDataExpression: true, | 				noDataExpression: true, | ||||||
| 				options: [ | 				options: [ | ||||||
| 					{ | 					{ | ||||||
| 						name: "Http Verbs", | 						name: "HTTP Verbs", | ||||||
| 						value: "httpverbs", | 						value: "httpverbs", | ||||||
| 					}, | 					}, | ||||||
| 					{ | 					{ | ||||||
|  | @ -54,24 +54,8 @@ export class HttpBin implements INodeType { | ||||||
| 				], | 				], | ||||||
| 				default: "httpverbs", | 				default: "httpverbs", | ||||||
| 			}, | 			}, | ||||||
| 			{ | 			...httpVerbOperations, | ||||||
| 				displayName: "Operation", | 			...httpVerbFields, | ||||||
| 				name: "operation", |  | ||||||
| 				type: "options", |  | ||||||
| 				noDataExpression: true, |  | ||||||
| 				displayOptions: { |  | ||||||
| 					show: { |  | ||||||
| 						resource: ["httpverbs"], |  | ||||||
| 					}, |  | ||||||
| 				}, |  | ||||||
| 				options: [ |  | ||||||
| 					{ |  | ||||||
| 						name: "GET", |  | ||||||
| 						value: "getMethod", |  | ||||||
| 					}, |  | ||||||
| 				], |  | ||||||
| 				default: "getMethod", |  | ||||||
| 			}, |  | ||||||
| 		], | 		], | ||||||
| 	}; | 	}; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue