-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathhttp_requests.txt
More file actions
77 lines (60 loc) · 2.73 KB
/
http_requests.txt
File metadata and controls
77 lines (60 loc) · 2.73 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
If you have this template code:
<body>
<% @movies.each do |movie| %>
Title: <%= movie.title %>, Year: <%= movie.year %>
<% end %>
</body>
and this database:
================================================
| id | Title | Year |
================================================
| 1 | A New Hope | 1977 |
------------------------------------------------
| 2 | The Empire Strikes Back | 1980 |
------------------------------------------------
| 3 | Return of the Jedi | 1983 |
------------------------------------------------
answer the following...
1. GET /movies
Fill this in with what the page will look like in the browser:
2. GET /movies/1
Fill this in with what the page will look like in the browser:
3. POST /movies with params {:movie => {:title => "The Phantom Menace", :year => 1998}}
Fill in what the database should look like after a post with parameters
================================================
| id | Title | Year |
================================================
| | | |
------------------------------------------------
| | | |
------------------------------------------------
| | | |
------------------------------------------------
| | | |
------------------------------------------------
4. PUT /movies/4 {:movie => {:title => "The Phantom Menace", :year => 1999}}
Fill in what the database should look like after the PUT with the parameters
================================================
| id | Title | Year |
================================================
| | | |
------------------------------------------------
| | | |
------------------------------------------------
| | | |
------------------------------------------------
| | | |
------------------------------------------------
5. GET /movies
Fill in what the page should look like in the browser
6. DELETE /movies/4
Fill in what the database should look like after the above request
================================================
| id | Title | Year |
================================================
| | | |
------------------------------------------------
| | | |
------------------------------------------------
| | | |
------------------------------------------------