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

icon picker
Verify that Requests are Cached to a Service in Kong for a Specific Consumer


Request Service

Run this command to request the service without supplying an apikey.
http get localhost:8000/ \
host:example.com
Response
The response should look similar to this:
HTTP/1.1 401 Unauthorized
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Wed, 12 Dec 2018 06:45:14 GMT
Server: kong/0.33-1-enterprise-edition
Transfer-Encoding: chunked
WWW-Authenticate: Key realm="kong"

{
"message": "No API key found in request"
}

Verify that Requests are Cached

Verify that Requests are Cached to a Service in Kong for a Specific Consumer
Run this command at least twice.
Response
The response should look similar to this: Notice the correct credentials applied and hit cache status

Summary

GREAT!
You expanded the Kong Proxy-Cache plugin configuration to cache request for a consumer.



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.