A Manic Developer's Place

Basic curl rest testing

November 19, 2014

linux

​ 
curl -X DELETE http://localhost:12000/samples/1 
 
curl -H "Content-Type: application/json" -d '{"name”:"sample-name","notes”:"sample-notes"}' http://localhost:12000/samples/ 
 
url -X PUT -H "Content-Type: application/json" -d '{"id": "2","name":"sample-name33333333","notes":"sample-notes"}' http://localhost:12000/api/samples/ 

ManicDev on Github

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O d-pu s-:+++ a+ C+++ UL+++ P- L++ E--- W+++ N o-- K--? w++ O M+ V PS PE Y+ PGP t+ 5? X+ R tv- b+ DI- D++ G e+ h++ r++ z
------END GEEK CODE BLOCK------