setup_api.sh 416 B

123456789101112131415161718
  1. #!/bin/bash
  2. curl -i -X POST \
  3. --url http://localhost:8001/services/ \
  4. --data 'name=kongtest' \
  5. --data 'url=http://mockbin.org'
  6. curl -i -X POST \
  7. --url http://localhost:8001/services/kongtest/routes \
  8. --data 'hosts[]=example.com'
  9. curl -X POST http:/localhost:8001/plugins/ \
  10. --data "name=statsd" \
  11. --data "config.host=127.0.0.1" \
  12. --data "config.port=9125" \
  13. --data "config.prefix=kong.production"