Arduino: missing: code examples to read keyboard string inputs via html GET and POST

Created on 22 Oct 2019  路  10Comments  路  Source: esp8266/Arduino

missing: code examples to read string inputs via html GET and POST
can you please provide some in your standard repo examples?

i.e., an example how to retrieve a string input from keyboard (until Enter is pressed) from a text input field on the website:
a) using the GET method to read it
b) using the POST method to read it.
then e.g. display the string which has been read in the Serial console.

Most helpful comment

it is not a SIMPLE MINIMAL example but overburdened by additional features like cookies and apart from this overburdened POST method it does also not show a SIMPLE GET method with evaluation in the Serial monitor to check it.
I also didn't say anything about autentification, btw.

write one. contribute

All 10 comments

why has this topic been closed? The issue is not resolved AFAIK.

SimpleAutentification is not a basic example how to read a string input from keyboard (until Enter is pressed) from a text input field on a most simple html website by GET and POST.
Using Cookies or password autentification are not subject of my topic.

SimpleAutentification is not a basic example how to read a string input from keyboard (until Enter is pressed) from a text input field on a most simple html website by GET and POST.
Using Cookies or password autentification are not subject of my topic.

it is
the login and password are entered in a html form and send with a submit button which can be tied with Enter key. the esp8266 web server processes the data sent by the form into parameters with names based on the names of the inputs on the form. study it

it is not a SIMPLE MINIMAL example but overburdened by additional features like cookies and apart from this overburdened POST method it does also not show a SIMPLE GET method with evaluation in the Serial monitor to check it.
I also didn't say anything about autentification, btw.

it is not a SIMPLE MINIMAL example but overburdened by additional features like cookies and apart from this overburdened POST method it does also not show a SIMPLE GET method with evaluation in the Serial monitor to check it.
I also didn't say anything about autentification, btw.

write one. contribute

if I knew one or could do so then I had not requested it.

the ESP8266 library handles GET and POST parameters for you. So the handling on the Arduino side is the same for GET and POST parameters. On HTML form part the difference is only in the FORM element attributemethod. it can be POST or GET like method='POST' or method='GET'. but this is not Arduino or esp8266 knowledge, this is HTML and web development topic

you can learn more here https://tttapa.github.io/ESP8266/Chap09%20-%20Web%20Server.html

@dsyleixa I closed this because:

  • you didn't bother to follow the instructions in the issue template
  • it is not an issue in the core
  • it is a request, and a "how do I" type at that

For general help, please refer to user forums like esp8266.com or stackoverflow. If you figure it out and would like to see such examples in our core, please make a PR with the proposed examples, and we'll review.

Things went very easy here :) could not say the same for his thread on esp32...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Marcelphilippeandrade picture Marcelphilippeandrade  路  3Comments

pablotix20 picture pablotix20  路  3Comments

treii28 picture treii28  路  3Comments

mark-hahn picture mark-hahn  路  3Comments

markusschweitzer picture markusschweitzer  路  3Comments