I am trying to hit my cache on qa environment and implementing the 2.1.18. Retrieving All Entries from Caches .
Below is my curl request. I get 400 bad request.
curl --location --request GET 'http://xyz/rest/v2/caches/transactionHistoryDB2?action=entries' \
--header 'Content-Type: application/json' \
--header 'Cookie: 162e0596c05ab56392204538c1bcdc6b=f0bbdadd8858aaca50b60a8d5229f3bb; 5bd921f90a94eab6bd4a256140d0f6a5=e3d7675963f136abc350ba63ff90cec9' \
--header 'Content-Typea: application/json' \
--header 'Authorization: Bearer Basic abcabcabcabcabcabc' \
--data-raw ''
In response I get Invalid 'action' parameter supplied
.
But if I pass ?action=stats
it works.
Can anybody tell me whats wrong?
The --data-raw ''
argument is actually forcing your call to be a POST
instead of a GET
. I used the following and it worked:
curl --digest -u username:password --header 'Content-Type: application/json' "http://127.0.0.1:11222/rest/v2/caches/a?action=entries"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.