-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0.4 new note
28 lines (23 loc) · 966 Bytes
/
0.4 new note
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
title 0.4 new note
browser->server: HTTP POST https://studies.cs.helsinki.fi/exampleapp/notes
server-->browser: redirect to https://studies.cs.helsinki.fi/exampleapp/notes
note over browser:
browser sends the form data to the server
and the server asks the page to redirect to itself (Reload)
end note
browser->server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/notes
server-->browser: HTML-code
browser->server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.css
server-->browser: main.css
browser->server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.js
server-->browser: main.js
note over browser:
browser starts executing js-code
that requests JSON data from server
end note
browser->server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/data.json
server-->browser: [{ content: "sdfsdf", date: "2021-07-04T22:11:21.674Z" }, ...]
note over browser:
browser executes the event handler
that renders notes to display
end note