2022-09-29 14:28:02 -07:00
|
|
|
import { INodeTypeBaseDescription, INodeVersionedType } from 'n8n-workflow';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
import { HttpRequestV1 } from './V1/HttpRequestV1.node';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
import { HttpRequestV2 } from './V2/HttpRequestV2.node';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
import { HttpRequestV3 } from './V3/HttpRequestV3.node';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
import { NodeVersionedType } from '../../src/NodeVersionedType';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
export class HttpRequest extends NodeVersionedType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'HTTP Request',
|
|
|
|
name: 'httpRequest',
|
|
|
|
icon: 'fa:at',
|
|
|
|
group: ['output'],
|
|
|
|
subtitle: '={{$parameter["requestMethod"] + ": " + $parameter["url"]}}',
|
|
|
|
description: 'Makes an HTTP request and returns the response data',
|
|
|
|
defaultVersion: 3,
|
2019-06-23 03:35:23 -07:00
|
|
|
};
|
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
const nodeVersions: INodeVersionedType['nodeVersions'] = {
|
|
|
|
1: new HttpRequestV1(baseDescription),
|
|
|
|
2: new HttpRequestV2(baseDescription),
|
|
|
|
3: new HttpRequestV3(baseDescription),
|
2019-06-23 03:35:23 -07:00
|
|
|
};
|
2022-06-13 13:25:09 -07:00
|
|
|
|
2022-09-29 14:28:02 -07:00
|
|
|
super(nodeVersions, baseDescription);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2021-10-27 13:00:13 -07:00
|
|
|
}
|