-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanswer.txt
16 lines (11 loc) · 906 Bytes
/
answer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1) Explain how a typical HTTP request is processed with the framework (the request lifecycle).
- the framework will receive the http request
- then the router will find the route that will accept this request. The first route that matches the request is invoked.
- the application code will be executed.
- then finally the action method will be given as http response.
2) Why should GET requests be indempotent?
GET is conventionally idempotent. That means, it doesn't change the state, so results can be cached, bookmarks can be made safely etc.
For example one could mention hyperlinks (which do GET-requests). E.g. if a hyperlink would perform some DELETE-actions, this could cause very much trouble.
In this case, a simple Google-search could delete some data (since the google spider follows hyperlinks)!
3) Where should you format data for rendering?
In the view.