jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
641 stars 116 forks source link

How to use Ajax? #20

Closed jaboh closed 6 years ago

jaboh commented 6 years ago

Many thanks for making MicroWebSrv available! I got a live web page update loop working with web sockets, but the real page I am trying to port to the esp32 uses Jquery Ajax (with web.py on a Raspberry Pi Zero). It would save me quite some work if I would not have to rewrite/debug the script for web sockets. The browser developer window tells me that the script hangs in a send. The server does not register any activity at all. What am I doing wrong? testajax.py: testajax.py.txt testajax.html: testajax.html.txt

jaboh commented 6 years ago

I'm such an idiot: omitted the 'url: "/test" argument! Works like a dream now, thanks for listening :-)

jczic commented 6 years ago

Yeah ! Cool and thank you for using this code 👍