Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D128482
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
const CC = Components.Constructor;
|
||||
const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1", "nsIBinaryInputStream", "setInputStream");
|
||||
const BinaryInputStream = CC(
|
||||
"@mozilla.org/binaryinputstream;1",
|
||||
"nsIBinaryInputStream",
|
||||
"setInputStream"
|
||||
);
|
||||
|
||||
// Returns a JSON string containing the query string arguments and the
|
||||
// request body parsed as JSON.
|
||||
@@ -20,7 +24,7 @@ function handleRequest(request, response) {
|
||||
const body = String.fromCharCode.apply(null, bytes);
|
||||
|
||||
// Write response body
|
||||
const data = {queryString: {}, body: body ? JSON.parse(body) : {}};
|
||||
const data = { queryString: {}, body: body ? JSON.parse(body) : {} };
|
||||
const params = request.queryString.split("&");
|
||||
for (const param of params) {
|
||||
const [key, value] = param.split("=");
|
||||
|
||||
Reference in New Issue
Block a user