Skip to content
VERIFY THAT REQUESTS TO A SERVICE ARE CACHED IN KONG

icon picker
Review: Add a Service and Route

In a previous lab, you learned how to add a Service, Route and verified that requests are forwarded through Kong. Use the following commands to quickly:
Add your Service using the Admin API
Add a Route for the Service
Forward Requests through Kong

# Add your Service using the Admin API
http post localhost:8001/services \
name=httpbin \
url=http://httpbin.org/anything

# Add a Route for the Service
http post localhost:8001/services/httpbin/routes \
hosts:='["example.com"]'

# Verify - Forward Requests through Kong
http get localhost:8000/ \
host:example.com

Next Section


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.