Add support for CONNECT method on HTTP Request Node

I use proxy when connecting to https such as https://example.com/.
At this time, the proxy server needs to be connected to with the “CONNECT method”, but this is not in the ‘Request Method’ setting of the http request node.

For https, the log on the proxy server (squid) side will look like the following when using a browser or the curl command.
Method: CONNECT

2023-02-21 02:53:22.861 XXX 10.10.X.XXX TCP_TUNNEL/200 XXXX CONNECT www.example.com:443 - HIER_DIRECT/www.example.com -

However, the logs via n8n were as follows.
Method: GET

2023-02-20 13:06:37.120 XXX 10.10.XX.XXX TCP_MISS/503 XXXX GET https://www.example.com/ - HIER_DIRECT/www.example.com text/html

Therefore, it is necessary to explicitly configure the connection with the CONNECT method.

This is a problem with the underlying axios library… very painful :man_facepalming:

1 Like

Thank you for your answer!

It seems difficult to solve the problem as you said it is not an n8n issue.
Hopefully this will be fixed in axios.

It is sad that we have the http request node, but we will create it ourselves with Execute Command.