network-content.js (785B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 const { 8 generateActorSpec, 9 RetVal, 10 Arg, 11 } = require("resource://devtools/shared/protocol.js"); 12 13 const networkContentSpec = generateActorSpec({ 14 typeName: "networkContent", 15 methods: { 16 sendHTTPRequest: { 17 request: { 18 request: Arg(0, "json"), 19 }, 20 response: RetVal("number"), 21 }, 22 getStackTrace: { 23 request: { resourceId: Arg(0) }, 24 response: { 25 // stacktrace is an "array:string", but not always. 26 stacktrace: RetVal("json"), 27 }, 28 }, 29 }, 30 }); 31 32 exports.networkContentSpec = networkContentSpec;