getting_started.sh 764 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. make httpd curl
  3. bin/httpd -s restart -d
  4. ps aux | grep httpd
  5. # http web service
  6. bin/curl -v localhost:8080
  7. # http indexof service
  8. bin/curl -v localhost:8080/downloads/
  9. # http api service
  10. bin/curl -v localhost:8080/v1/api/hello
  11. bin/curl -v localhost:8080/v1/api/echo -d "hello,world!"
  12. bin/curl -v localhost:8080/v1/api/query?page_no=1&page_size=10
  13. bin/curl -v localhost:8080/v1/api/kv -H "Content-Type:application/x-www-form-urlencoded" -d 'user=admin&pswd=123456'
  14. bin/curl -v localhost:8080/v1/api/json -H "Content-Type:application/json" -d '{"user":"admin","pswd":"123456"}'
  15. bin/curl -v localhost:8080/v1/api/form -F "file=@LICENSE"
  16. # RESTful API: /group/:group_name/user/:user_id
  17. bin/curl -v -X DELETE localhost:8080/v1/api/group/test/user/123