How to handle <form> data received by http server e.g (key=value&key=value&key=value&…) using C language?
Posted: Tue Jan 15, 2019 1:42 am
I have http server running on esp32. It serves a short html web page that contains a form. Once I fill the form and click submit using POST method, I receive the form values as follows:
The question is: how can I handle this data by saving each key=vale in a variable so it it can be later saved in the NVS flash? e.g:
I am using ESP-IDF and C language
Thank you very much
The whole data received is saved as a string inside a buffer.Key1=value1&Key2=value2&Key3=value3&...
The question is: how can I handle this data by saving each key=vale in a variable so it it can be later saved in the NVS flash? e.g:
Code: Select all
int key1 = value1
int key2 = value2
int key3 = value3
Thank you very much