logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

How to Read POST Data and URL Parameters on ESP8266 Using Arduino IDE and ESP8266WebServer

marcin1301993 3483 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15983801
    marcin1301993
    Level 12  
    Posts: 142
    Help: 1
    Rate: 14
    Hello, please help me to add POST support.
    When I programmed ESP in NODEMC in LUA there was no problem, I checked the payload content and looked for what I was interested in.
    Here it is no longer so rosy.
    I currently use ESP to control relays using GET, but sending text from a WEB page to a server that sits on ESP requires reading it (the text) from a URL, unfortunately I don't know how to read it in the program.
    How to read the POST in the Arduino I don't know either, can you help me?

    Here is the code:

    Code: C / C++
    Log in, to see the code
    [/code]
  • ADVERTISEMENT
  • Helpful post
    #2 15984177
    suser222
    Level 24  
    Posts: 576
    Help: 74
    Rate: 84
    I solved the POST handling like this:
    Code: C / C++
    Log in, to see the code
  • #3 15984583
    marcin1301993
    Level 12  
    Posts: 142
    Help: 1
    Rate: 14
    Fellow Suser, this is exactly what I needed. It's even simpler than in LUA because you can send several values at once without fiddling around. Thanks a lot again.
    I'm starting to like Arduino more and more, no need to reinvent the wheel :)

    I'll leave the topic open for a while if anyone has any questions, but I think user code suser222 explains everything.
ADVERTISEMENT