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
391 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/1 -H "content-type:application/json" -d {"title":"This is an updated title","text":"This is an updated text"}' -X PUT
curl localhost:8000/randomdata/1
curl localhost:8000/randomdata/1 -X DELETE