mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #2540 from vladimir-kazan/fix-deprecation-warning
Fix: Remove nodejs deprecation warning in 21-httpin node
This commit is contained in:
commit
95418724fa
@ -228,7 +228,7 @@ module.exports = function(RED) {
|
||||
var diff = process.hrtime(startAt);
|
||||
var ms = diff[0] * 1e3 + diff[1] * 1e-6;
|
||||
var metricResponseTime = ms.toFixed(3);
|
||||
var metricContentLength = res._headers["content-length"];
|
||||
var metricContentLength = res.getHeader("content-length");
|
||||
//assuming that _id has been set for res._metrics in HttpOut node!
|
||||
node.metric("response.time.millis", {_msgid:res._msgid} , metricResponseTime);
|
||||
node.metric("response.content-length.bytes", {_msgid:res._msgid} , metricContentLength);
|
||||
|
Loading…
Reference in New Issue
Block a user