An example of a CRUD api in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
445 B

curl localhost:8000/randomdata
curl localhost:8000/randomdata -H "content-type:application/json" -d '{"title":"This is a title","text":"This is a text"}' -X POST
curl localhost:8000/randomdata/1618064651615612586 -H "content-type:application/json" -d {"title":"This is an updated title","text":"This is an updated text"}' -X PUT
curl localhost:8000/randomdata/1618065099475731301
curl localhost:8000/randomdata/1618065099475731301 -X DELETE