The same URl for different http methods acts differently. Below is a table depicting the same.
HTTP VERB | URL | DESCRIPTION |
---|---|---|
GET | /api/students | Returns all students |
GET | /api/students/5 | Returns details of Student Id =5 |
POST | /api/students | Add a new student |
PUT | /api/students/5 | Update student with Id=5 |
DELETE | /api/students/5 | Delete student with Id = 5 |