1v91 HTTP server callback called twice #5663
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 1 comment
-
|
Posted at 2017-04-19 by @gfwilliams Maybe you could dump the contents of the request object at the same time? You usually get two requests from a browser - one for the requested page, and one for the favicon. Posted at 2017-04-19 by user75944 That sounds like a good explanation. I'm so used to using a router I overlooked that it would request a favicon too. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-04-18 by user75944
I have just got started using Espruino, it looks great, but I have come across a few issues. I don't know if it's my fault, but I have found that when I use the built in HTTP server the callback function is called twice. Once with the query parameters, and once (second time) with them nulled out. This
I am using using a compiler to generate my JS, so it's slightly awkward but still readable. Here is the callback used by wifi.connect()
log output from hitting the page once:
The work around I'm using is just to only set the LEDs if the query is not null. What might be going wrong?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions