summaryrefslogtreecommitdiffstats
path: root/devtools/shared/commands/resource/transformers/network-events.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/commands/resource/transformers/network-events.js')
-rw-r--r--devtools/shared/commands/resource/transformers/network-events.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/devtools/shared/commands/resource/transformers/network-events.js b/devtools/shared/commands/resource/transformers/network-events.js
new file mode 100644
index 0000000000..4da4052365
--- /dev/null
+++ b/devtools/shared/commands/resource/transformers/network-events.js
@@ -0,0 +1,16 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {
+ getUrlDetails,
+ // eslint-disable-next-line mozilla/reject-some-requires
+} = require("resource://devtools/client/netmonitor/src/utils/request-utils.js");
+
+module.exports = function({ resource }) {
+ resource.urlDetails = getUrlDetails(resource.url);
+ resource.startedMs = Date.parse(resource.startedDateTime);
+ return resource;
+};