mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
8219a5c503
Differential Revision: https://phabricator.services.mozilla.com/D177025
17 lines
399 B
JavaScript
17 lines
399 B
JavaScript
function handleRequest(request, response) {
|
|
response.processAsync();
|
|
|
|
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
|
timer.init(
|
|
function () {
|
|
response.finish();
|
|
},
|
|
5000,
|
|
Ci.nsITimer.TYPE_ONE_SHOT
|
|
);
|
|
|
|
response.setStatusLine(null, 200, "OK");
|
|
response.setHeader("Content-Type", "text/plain", false);
|
|
response.write("Start of the content.");
|
|
}
|