wolfrose:
- Do you mean that I don't have to lean html programming when I want to design and web page for any project ?
- Which parameters you mean ?
Ok. It's like this:
HTML stands for HyperText Markup Language. It's what web pages are written in - it allows you to describe a web page with images, formatted text, hyperlings, embedded javascript code - all that stuff. Everything between a <html>
and a </html>
is html.
HTTP stands for HyperText Transfer Protocol. It's a way of moving data from one place to another over the internet. It does this by the client and server sending a few lines of data to one another before sending the HTML itself.
HTTP concerns itself with URLs like: https://forum.arduino.cc/index.php?topic=705974.0
, and with a bunch of sideband data that you don't normally see when you open a URL in a web browser.
So when your ESP8266 sends an html "hello world" to your web browser in reply to a GET message, what actually happens is that your web browser sends this over the wire:
GET /HelloWorld.html HTTP/1.1
Accept: text/html
Connection: close
And the web browser replies with:
HTTP/1.1 200 OK
Content-Type:text/html
Connection: close
<html><body>Hello, World!</body></html>
Of course, in a real request there will be much more than just the Accept and Connection headers.
As noiasca says, the ESP libraries contain stuff to make it far simpler to do the HTTP side of what a webserver needs to do - which can be very much more complicated than in this toy example here.
But even though the ESP takes care of much of it, it helps to understand what it is doing for you, especially if you want to do a complicated website with multiple pages and error handling.
You can work on just the HTML side of things by editing HTML files on your computer and opening them with a web browser. There's a world of stuff to learn, depending on how fancy you want your pages to be.
When it comes to serving those files and having the arduino do something useful when a user hits a button, you have to deal with HTTP. At the very least, you need to know that the stuff after a question mark in the URL is called the "parameters".