| Method | Description |
|---|---|
| open(method, url, async) | Specifies the type of request method: the type of request: GET or POST url: the server (file) location async: true (asynchronous) or false (synchronous) |
| send() | Sends the request to the server (used for GET) |
| send(string) | Sends the request to the server (used for POST) |
xhttp.open("GET", "url", true);
xhttp.send(); xhttp.open("GET", "ajax-tutorial.php", true);
xhttp.send(); xhttp.open("POST", "url", true);
xhttp.send(string); xhttp.open("POST", "ajax-tutorial.asp", true);
xhttp.send("TutorialName");