Skip to content

Instantly share code, notes, and snippets.

@shotaK
Created December 24, 2015 11:45
Show Gist options
  • Select an option

  • Save shotaK/69236de65525211e4625 to your computer and use it in GitHub Desktop.

Select an option

Save shotaK/69236de65525211e4625 to your computer and use it in GitHub Desktop.
// DELETE specific rest resource
curl -v -X DELETE http://localhost:8080/api/components/country/3
// POST specific rest resource (id is generated automatically)
curl -i -X POST -H "Content-Type:application/json" http://localhost:8080/api/components/country -d '{"countryCode": "COW","countryName": "Cowland"}'
// PUT (update) specific rest resource
curl -i -X PUT -H "Content-Type:application/json" http://localhost:8080/api/components/country/5 -d '{"id": 5,"countryCode": "AS","countryName": "American COWA"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment