Last active
June 7, 2018 13:34
-
-
Save jmarmolejos/ad61bb943310ea68b29754a7022b2c2d to your computer and use it in GitHub Desktop.
config kong
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Add api | |
$ curl -i -X POST \ | |
--url http://localhost:8001/apis/ \ | |
--data 'name=requestbin' \ | |
--data 'upstream_url=http://requestb.in/' \ | |
--data 'request_host=requestb.in' | |
-- Update api | |
$ curl -i -X PATCH \ | |
--url http://localhost:8001/apis/requestbin \ | |
--data 'strip_request_path=true' | |
-- Proxy a request | |
$ curl -i -X GET \ | |
--url http://localhost:8000/ \ | |
--header 'Host: requestb.in' \ | |
--header "apikey: Rm9vYmFy" | |
-- Configure key-auth plugin | |
$ curl -i -X POST \ | |
--url http://localhost:8001/apis/requestbin/plugins/ \ | |
--data 'name=key-auth' | |
-- Create a consumer | |
$ curl -i -X POST \ | |
--url http://localhost:8001/consumers/ \ | |
--data "username=requestbin_user" | |
-- Provision credentials | |
$ curl -i -X POST \ | |
--url http://localhost:8001/consumers/requestbin_user/key-auth/ \ | |
--data 'key=Rm9vYmFy' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment