Contexto
Form Attributes
The form has attributes on it's own, not only the input fields that is comprised of. Some of them we have already seen them, like the novalidate attribute, some of them not.
Two of the most important ones are the action attribute and the method attribute.
The action attribute defines the responsible file for accepting the data from the client. Normally this is a server-side script that does something with it, either saves the data to database, retrieve it from there, serves a new html file to the client and many many more. The file's address is used with a relative path here. What is going to happen after the file (server's API) has received the data is no subject to client side programming, and it shouldn't bother us for now.
The method attribute is descriptive. Defines the way that the data is going to be sent to the server. There are mainly 5 http methods:
1. Get - Mostly used for fetching data from an external source
2. Post - Mostly used for sending data to a remote source
3. Put - Used for update data to a remote source
4. Delete - Delete data to a source
5. Patch - Similar to put, used for updating but instead of a whole object, only a piece of it.
We will learn more about the possible methods and what do they mean when we use the fetch api to talk with servers and exchange data.
Until then, bear in mind, that when dealing and exchanging sensitive data (credit card numbers, bank accounts, user password etc) always use post instead of get. Get request includes the body of the request to the url, while post doesn't.