3 - ESP IDF WIFI Server for esp32 - GET and POST REST request. Espressif example.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this video is about installing the server for the rest commands specifically get and post on the esp32 this video is based on previous four videos which was published recently in this playlist we have one video of a credentials definition if you are working via vs code and compiling the code via vs code for other videos based on the original version of esp-idf from the expressive side the first one is about the esp-idfis installation the second one about the connection to wi-fi and simple get request the third one is uh is initiating a server and performing a get request on esp32 from the browser and the first one is initiating the server on the esp32 and performing the post request from the pc to the esp32 and server which was created on the chip in this video we want to take a standard example which was posted on the expressive site for the http server this example which we partially used in the previous video to perform copy paste of this example and make a working example of the server which will perform get and post commands so we will take our previous code and make some changes what was changed from the previous codes that we used which was much more simplified in order to make it more readable we remain the flash initiation the memory initiation and the wi-fi connection which was not changed in any way and the only change that we changed our functions that we built built to start web server the function that the site use we took all this and copy pasted it to our code here it is it's it's a copy paste as is and perform a few small changes in order that it will work please note that we added inclu include 6 parameter header which is used for this main function and if you want to use this function you have to add this header we kept completely unchanged wi-fi event handler from the previous videos and wi-fi connection in order to initiate wi-fi connection from the previous videos and after we copy pasted this code the only change that was made is inside the uri which here you see is slash uri which they meant to put the correct uri we just put the root uri without any specification now we will try to use postman in order to send command from our pc via wi-fi to to the esp32 we'll open our postman with the previous previous command first we should compile just to see that everything is all right it was saved yes it was saved now we're compiling the the program here the user revision from the post request the program should return uri post response and for the get request it should return uri get response in their classical example the program doesn't print anything on the screen as we did in the previous videos here we can see our ip of this site so if we are going to the postman and using the same ip here for example we will do the post request and inside the body we will write something but it won't be shown on the screen we only will re have the response from our server on the esp32 so we are sending the request and we got the response you are your uri post response that the server from the esp32 have responded to us in the similar way we can perform the get command and trying to get the information from our server we'll send and the your get response is also working another way to perform a get command is uh by going to our browser hitting it in the command line we get the same response you are a get response you will get response to the browser code because we are performing the get command via the browser and here with the postman that's all and this example showed how we can use boilerplate code from the espressif site which was practically copy pasted to the working program thank you
Info
Channel: SIMS IOT Devices
Views: 4,593
Rating: undefined out of 5
Keywords:
Id: wumfKmjRIZo
Channel Id: undefined
Length: 6min 53sec (413 seconds)
Published: Sat Sep 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.