Is it possible to get the data of a post request from within the http.createServer callback?
http.createServer(function(req, res) {
if (req.method == "GET") {
// do get stuff
} else if (req.method == "POST") {
// save post data to sd-card
}
}).listen(port);
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Is it possible to get the data of a post request from within the http.createServer callback?