rg_backend_academy/lecture_4/dinosaurs-without-db/dinosaurs.http

31 lines
733 B
HTTP

### List all dinosaurs
GET http://localhost:3000/dinosaurs
### Get one dinosaur
GET http://localhost:3000/dinosaurs/1
### Create a dinosaur
POST http://localhost:3000/dinosaurs
Content-Type: application/json
{
"name": "Triceratops",
"description" : "Triceratops (neboli třírohá tvář) ",
"period": "křída",
"wikipediaAddress": "https://cs.wikipedia.org/wiki/Triceratops"
}
### Replace a dinosaur
PUT http://localhost:3000/dinosaurs/1
Content-Type: application/json
{
"name": "Tyrannosaurus",
"description": "Tyrannosaurus ",
"period": "křída",
"wikipediaAddress": "https://en.wikipedia.org/wiki/Tyrannosaurus"
}
### Delete a dinosaur
DELETE http://localhost:3000/dinosaurs/1