About post - I've definitely had req.on('data') working fine, even for handling uploads of multiple files. Is your Espruino firmware up to date?
Do you just get no calls to it at all? Perhaps you could try POSTing from something like curl on your PC, just to make sure it's not something with the way you're POSTing from the web browser?
To be honest for simple on/off stuff I've just been encoding it on the URL (/set?light=on/off) and decoding it with url.parse - I don't think there are huge problems with that as long as POST is used?
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.
Looks good!
About post - I've definitely had
req.on('data')
working fine, even for handling uploads of multiple files. Is your Espruino firmware up to date?Do you just get no calls to it at all? Perhaps you could try POSTing from something like
curl
on your PC, just to make sure it's not something with the way you're POSTing from the web browser?To be honest for simple on/off stuff I've just been encoding it on the URL (
/set?light=on/off
) and decoding it withurl.parse
- I don't think there are huge problems with that as long as POST is used?