The XMLHttpRequest open() Method
The open() method prepares the request for submission. Within it, we define three key parameters:
- Method: The type of HTTP request (most commonly "GET" for reading or "POST" for submitting
data).
- URL: The path to the file on the server (e.g., ".txt", ".json", ".php").
- Async: A boolean value (true/false) that determines whether the request should execute
asynchronously.