Mobile Web Applications
Prof. Dr. Ansgar Gerlicher and Dr. Thomas Fankhauser
GET / HTTP/1.1
Host: www.hdm-stuttgart.de
HTTP/1.1 302 Found
Date: Tue, 05 Sep 2017 12:32:40 GMT
Server: Apache
Location: https://www.hdm-stuttgart.de/
Content-Length: 213
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://www.hdm-stuttgart.de/">here</a>.</p>
</body></html>
telnet www.hdm-stuttgart.de 80
Trying 141.62.1.59...
Connected to www.hdm-stuttgart.de.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.hdm-stuttgart.de
HTTP/1.1 302 Found
Date: Tue, 05 Sep 2017 12:32:40 GMT
Server: Apache
Location: https://www.hdm-stuttgart.de/
Content-Length: 213
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://www.hdm-stuttgart.de/">here</a>.</p>
</body></html>
Connection closed by foreign host.
| Resource | GET | PUT | PATCH | POST | DELETE |
|---|---|---|---|---|---|
| http://api.example.com/users | List all users | Replace all users | - | Create a new user | Delete all users |
| http://api.example.com/users/5 | Retrieve user 5 | Replace or create user 5 | Update user 5 | - | Delete user 5 |
Resource can also be nested, e.g. http://api.example.com/users/5/messages is the collection of messages for user 5
> document.querySelectorAll("h1")
(1) [h1]
> document.querySelectorAll("h2")
(18) [h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2, h2]
> document.querySelector("h1").remove();
> var e = document.createElement("h1")
undefined
> document.body.prepend(e)
undefined
> e.innerText = "hello"
"hello"
> document.querySelector("h2").style.color = "blue";
undefined
> document.querySelector("h2").classList.add("blue");
undefined
> document.querySelector("h2").classList.remove("blue");
undefined
Services, Containers, Docker