# HG changeset patch # User rougeronj # Date 1420405132 -3600 # Node ID fa39654e7084a248f8f66525418114652a237c23 # Parent 554129dbdbd09582ba2b43186f294449768afee6 Add Post option to simple persist to be able to simulate "Save Once" which uses Post request diff -r 554129dbdbd0 -r fa39654e7084 client/data/simple-persist.js --- a/client/data/simple-persist.js Mon Dec 29 17:24:11 2014 +0100 +++ b/client/data/simple-persist.js Sun Jan 04 21:58:52 2015 +0100 @@ -15,7 +15,7 @@ res.setHeader('Content-Type', 'application/json; charset=utf-8'); res.statusCode = 200; - if(req.method === "PUT") { + if(req.method === "PUT" || req.method === "POST") { req.pipe(fs.createWriteStream(jsonFile)); res.end(JSON.stringify({result: "OK"})); }