Browse Source

Examples are in rows now

main
Unbewohnte 3 years ago
parent
commit
54d9e31470
  1. 10
      README.md

10
README.md

@ -14,11 +14,11 @@ Implemented:
- **DELETE**
## Examples
`curl localhost:8000/randomdata` - to get EVERYTHING (obviously a bad idea if you have lots of data)
`curl localhost:8000/randomdata -H "content-type:application/json" -d '{"title":"This is a title","text":"This is a text"}' -X POST` - to create a new RandomData (IDs are created automatically from 1-∞)
`curl localhost:8000/randomdata/1` - to get the first RandomData you`ve created
`curl localhost:8000/randomdata/1 -H "content-type:application/json" -d '{"title":"This is an updated title","text":"This is an updated text"}' -X PATCH` - to update the first RandomData
`curl localhost:8000/randomdata/1 -X DELETE` - to delete the first RandomData
- `curl localhost:8000/randomdata` - to get EVERYTHING (obviously a bad idea if you have lots of data)
- `curl localhost:8000/randomdata -H "content-type:application/json" -d '{"title":"This is a title","text":"This is a text"} ' -X POST` - to create a new RandomData (IDs are created automatically from 1-∞)
- `curl localhost:8000/randomdata/1` - to get the first RandomData you`ve created
- `curl localhost:8000/randomdata/1 -H "content-type:application/json" -d '{"title":"This is an updated title","text":"This is an updated text"}' -X PATCH` - to update the first RandomData
- `curl localhost:8000/randomdata/1 -X DELETE` - to delete the first RandomData
---

Loading…
Cancel
Save