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.

I have this issue.

It seems a workkaround has been found with tunnel-agent

I don’t now how to test in n8n :frowning:

1 Like

Hi,

I just saw that 1.22.0 included an updated version of Axios from 0.21.4 to 1.6.2.

I tested on 1.22.3, the issue is always present :frowning: