-->
Page 5 of 12

Re: ESP8266WebServer example

PostPosted: Sun Mar 29, 2015 5:34 am
by igrr
@nicoverduin There is a patch on GitHub to support Eclipse Arduino plugin:
https://github.com/esp8266/Arduino/issues/2
I will merge it for the next release, meanwhile you can apply it locally to see if it is okay.

Re: ESP8266WebServer example

PostPosted: Sun Mar 29, 2015 7:00 am
by nicoverduin
Yep,

Fixed it. Great!!!

Regards
Nico

Re: ESP8266WebServer example

PostPosted: Thu Apr 02, 2015 10:33 pm
by andrew melvin
Is there a call or function to return the number of params that have been entered by the browser.

I'm using forms, and I want to know when the request has finished to save things to the eeprom. Only the number of fields completed is not known.

For a form where defaults are filled out I know there are 4, so I can count through the loop then act. For another form I can't so it would be useful to have a when var == server.paramscount() then....

Also what does client.flush() do?

Cheers!

Re: ESP8266WebServer example

PostPosted: Fri Apr 03, 2015 3:11 am
by gerardwr
andrew melvin wrote:Is there a call or function to return the number of params that have been entered by the browser.
...


No, you will have to scan the URL that the browser sent yourself.

The various parameters are probably separated by an & sign (something like &var1=123&var2=56). So you need some kind of loop:
- locate the & sign
- get the name of the parameter
- get the value of the parameter
- and again till the the URL is completely processed.

I am sure if you load at other Arduino example you will find something you can use.

Good luck.