Because I couln’t use axios (see my previous post about it), I use native modules to post data through a proxy (http+tls). This code of the function works well alone, but connection does not trigger in the node, could you see why ?
function sendAlert(ci: ConnectItems, alert: Alert) {
var req = Http.request({
host: ci.proxy,
port: 3128,
method: 'CONNECT',
path: ci.url + ":443"
});
req.on('connect', function (res, socket, head) {
var cts = Tls.connect({
host: ci.url,
socket: socket,
}, function () {
cts.write("POST /api/alert HTTP/1.0 .......
});
Thanks jan, I didn’t dare because request is marked deprecated …
About the syntax, you also use the request module in core n8n for exemple here n8n/NodeExecuteFunctions.ts at master · n8n-io/n8n · GitHub , but I can’t see where this.helpers points to, could you enlighten me ?
(github code navigation seems sometimes wrong to me)
(and i’ve just seen that Creating Your First Node | Docs), why ‘helpers’ ?