Taking a break
It seems the WEB IDE doesn't want to load the ESP8266 module tonight for some reason. Other files get sent to the board and run.
Thanks Gordon for the pipe suggested arguments. The weird error occurs even using the original Example f.pipe(res); // streams the file to the HTTP response
I have a Pico and ESP8266 but no shim as yet. Sparkfun has mico SD card breakout boards or you can use an adapter as shown on the Espruino site. I'm curious to find out if this code would work on the Pico as well.
I was working on the GET side of the code with the pipe function, it's arguments and the error message that appears. It seems this didn't fix the POST bug like I thought. Just getting a better handle on how the on('data') function works was part of the learning curve that fixed the problem.
I did manage to edit the HTML file to remove the message from the header and replace it with "CMD". The message gets posted after the header. This change works.
Leaving the field as "" doesn't work. I have considered using this field in a switch statement so that other types of POST message could be developed. Candidates might be delete a file, or write a file...
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.
Taking a break
It seems the WEB IDE doesn't want to load the ESP8266 module tonight for some reason. Other files get sent to the board and run.
Thanks Gordon for the pipe suggested arguments. The weird error occurs even using the original Example f.pipe(res); // streams the file to the HTTP response
I have a Pico and ESP8266 but no shim as yet. Sparkfun has mico SD card breakout boards or you can use an adapter as shown on the Espruino site. I'm curious to find out if this code would work on the Pico as well.
I was working on the GET side of the code with the pipe function, it's arguments and the error message that appears. It seems this didn't fix the POST bug like I thought. Just getting a better handle on how the on('data') function works was part of the learning curve that fixed the problem.
I did manage to edit the HTML file to remove the message from the header and replace it with "CMD". The message gets posted after the header. This change works.
Leaving the field as "" doesn't work. I have considered using this field in a switch statement so that other types of POST message could be developed. Candidates might be delete a file, or write a file...