Closed blue112 closed 4 years ago
Using this code:
js.node.Https.request(path, function(res:js.node.http.IncomingMessage) {}).end();
Generates:
js_node_Https.request(path, null ,function(res) {}).end();
The null here breaks the code and the https request is not sent. The correct code is :
null
js_node_Https.request(path ,function(res) {}).end();
A workaround is to use all three parameters with valid inputs:
js.node.Https.request(path, {}, function(res:js.node.http.IncomingMessage) {}).end();
Using hxnodejs with haxelib 12.1.0, and nodejs v12.18.2
Hm, good catch, and looks like get() has the same issue. A bit annoying, but we can fix this by adding more overloads.
get()
Using this code:
Generates:
The
null
here breaks the code and the https request is not sent. The correct code is :A workaround is to use all three parameters with valid inputs:
Using hxnodejs with haxelib 12.1.0, and nodejs v12.18.2