Skip to content

Instantly share code, notes, and snippets.

@ukchukx
Created January 21, 2020 20:22
Show Gist options
  • Save ukchukx/e5fcbbe137b1118da8e8a2f23b4d6c28 to your computer and use it in GitHub Desktop.
Save ukchukx/e5fcbbe137b1118da8e8a2f23b4d6c28 to your computer and use it in GitHub Desktop.
$ curl -i -X POST --url http://localhost:8001/services/kc-chat-backend/routes \
--data 'paths[]=/api/kongchat' --data 'strip_path=false' --data 'methods[]=GET' \
--data 'methods[]=POST'
# Sample output
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/1.4.3
Content-Length: 407
X-Kong-Admin-Latency: 30
{
"id": "4fd4c22f-2760-49e2-9dda-64435ef4553f",
"tags": null,
"destinations": null,
"headers": null,
"protocols": [
"http",
"https"
],
"snis": null,
"service": {
"id": "91e5cec5-abee-4b6c-b07c-11643a1678af"
},
"name": null,
"preserve_host": false,
"regex_priority": 0,
"strip_path": false,
"sources": null,
"paths": [
"/api/kongchat"
],
"https_redirect_status_code": 426,
"hosts": null,
"methods": [
"GET",
"POST"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment