/** * HTTP Request Node - Version 1 * Makes an HTTP request and returns the response data */ export interface HttpRequestV1Params { /** * The way to authenticate * @default none */ authentication?: 'basicAuth' | 'digestAuth' | 'headerAuth' | 'none' | 'oAuth1' | 'oAuth2' | 'queryAuth' | Expression; /** * The request method to use * @default GET */ requestMethod?: 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | Expression; /** * The URL to make the request to */ url?: string | Expression | PlaceholderValue; /** * Whether to download the response even if SSL certificate validation is not possible * @default false */ allowUnauthorizedCerts?: boolean | Expression; /** * The format in which the data gets returned from the URL * @default json */ responseFormat?: 'file' | 'json' | 'string' | Expression; /** * Name of the property to which to write the response data * @displayOptions.show { responseFormat: ["string"] } * @default data */ dataPropertyName?: string | Expression | PlaceholderValue; /** * Whether the query and/or body parameter should be set via the value-key pair UI or JSON/RAW * @default false */ jsonParameters?: boolean | Expression; options?: { /** Time (in milliseconds) between each batch of requests. 0 for disabled. * @default 1000 */ batchInterval?: number | Expression; /** Input will be split in batches to throttle requests. -1 for disabled. 0 will be treated as 1. * @default 50 */ batchSize?: number | Expression; /** Content-Type to use to send body parameters * @displayOptions.show { /requestMethod: ["PATCH", "POST", "PUT"] } * @default json */ bodyContentType?: 'json' | 'raw' | 'multipart-form-data' | 'form-urlencoded' | Expression; /** Whether to return the full response data instead of only the body * @default false */ fullResponse?: boolean | Expression; /** Whether to follow All HTTP 3xx redirects * @default false */ followAllRedirects?: boolean | Expression; /** Whether to follow GET or HEAD HTTP 3xx redirects * @default true */ followRedirect?: boolean | Expression; /** Whether to succeeds also when status code is not 2xx * @default false */ ignoreResponseCode?: boolean | Expression; /** Specify the mime type for raw/custom body type * @displayOptions.show { /requestMethod: ["PATCH", "POST", "PUT"] } */ bodyContentCustomMimeType?: string | Expression | PlaceholderValue; /** HTTP proxy to use */ proxy?: string | Expression | PlaceholderValue; /** Whether to output each element of an array as own item * @displayOptions.show { /responseFormat: ["json"] } * @default false */ splitIntoItems?: boolean | Expression; /** Time in ms to wait for the server to send response headers (and start the response body) before aborting the request * @default 10000 */ timeout?: number | Expression; /** Whether you need arrays to be serialized as foo=bar&foo=baz instead of the default foo[0]=bar&foo[1]=baz * @default false */ useQueryString?: boolean | Expression; }; /** * Whether binary data should be send as body * @displayOptions.show { jsonParameters: [true], requestMethod: ["PATCH", "POST", "PUT"] } * @default false */ sendBinaryData?: boolean | Expression; /** * For Form-Data Multipart, they can be provided in the format: <code>"sendKey1:binaryProperty1,sendKey2:binaryProperty2</code> * @hint The name of the input binary field containing the file to be uploaded * @displayOptions.show { jsonParameters: [true], requestMethod: ["PATCH", "POST", "PUT"] } * @displayOptions.hide { sendBinaryData: [false] } * @default data */ binaryPropertyName?: string | Expression | PlaceholderValue; /** * Body parameters as JSON or RAW * @displayOptions.show { jsonParameters: [true], requestMethod: ["PATCH", "POST", "PUT", "DELETE"] } * @displayOptions.hide { sendBinaryData: [true] } */ bodyParametersJson?: IDataObject | string | Expression; /** * The body parameter to send * @displayOptions.show { jsonParameters: [false], requestMethod: ["PATCH", "POST", "PUT", "DELETE"] } * @default {} */ bodyParametersUi?: { /** Parameter */ parameter?: Array<{ /** Name of the parameter */ name?: string | Expression | PlaceholderValue; /** Value of the parameter */ value?: string | Expression | PlaceholderValue; }>; }; /** * Header parameters as JSON or RAW * @displayOptions.show { jsonParameters: [true] } */ headerParametersJson?: IDataObject | string | Expression; /** * The headers to send * @displayOptions.show { jsonParameters: [false] } * @default {} */ headerParametersUi?: { /** Header */ parameter?: Array<{ /** Name of the header */ name?: string | Expression | PlaceholderValue; /** Value to set for the header */ value?: string | Expression | PlaceholderValue; }>; }; /** * Query parameters as JSON (flat object) * @displayOptions.show { jsonParameters: [true] } */ queryParametersJson?: IDataObject | string | Expression; /** * The query parameter to send * @displayOptions.show { jsonParameters: [false] } * @default {} */ queryParametersUi?: { /** Parameter */ parameter?: Array<{ /** Name of the parameter */ name?: string | Expression | PlaceholderValue; /** Value of the parameter */ value?: string | Expression | PlaceholderValue; }>; }; } export interface HttpRequestV1Credentials { httpBasicAuth: CredentialReference; httpDigestAuth: CredentialReference; httpHeaderAuth: CredentialReference; httpQueryAuth: CredentialReference; oAuth1Api: CredentialReference; oAuth2Api: CredentialReference; } interface HttpRequestV1NodeBase { type: 'n8n-nodes-base.httpRequest'; version: 1; credentials?: HttpRequestV1Credentials; } export type HttpRequestV1ParamsNode = HttpRequestV1NodeBase & { config: NodeConfig; }; export type HttpRequestV1Node = HttpRequestV1ParamsNode;