常用命令:
# ALL TEST CASE OK with php-crud-api-1.2.18 use curl7.83 for php5.3 # ADD ## LINUX curl -X POST -d '{"id":2,"name":"Internet"}' -H "Content-type: application/json" http://127.0.0.1/api.php/project curl -X POST -d '[{"id":3,"name":"Internet"}]' -H "Content-type: application/json" http://127.0.0.1/api.php/project ## WIN: curl -X POST -d "{\"id\":2,\"name\":\"Internet\"}" -H "Content-type: application/json" http://localhost/api.php/project curl -X POST -d "[{\"id\":3,\"name\":\"Internet\"}]" -H "Content-type: application/json" http://localhost/api.php/project # DELETE curl -X DELETE http://localhost/api.php/project/2 curl -X DELETE http://localhost/api.php/project/1,2 # UPDATE ## WIN: curl -X PUT -d "{\"name\":\"api\"}" -H "Content-type: application/json" http://localhost/api.php/project/1 curl -X PUT -d "[{\"name\":\"api\"},{\"name\":\"API\"}]" -H "Content-type: application/json" http://localhost/api.php/project/1,2 # SELECT # page not support curl -X GET http://localhost/api.php/project curl -X GET http://localhost/api.php/project?transform=1 curl -X GET http://localhost/api.php/project/1 curl -X GET http://localhost/api.php/project/1,2 curl -X GET http://localhost/api.php/project?columns=id curl -X GET http://localhost/api.php/project?order=id&page=1 curl -X GET http://localhost/api.php/project?order=id&page=1,50