Closed Kozlov-V closed 10 years ago
Hello,
My apologies for this late reply, but I am currently travelling and do not have access to a unix system to try to reproduce this issue. I guess you must be using a web browser if you get 304s, since they are what is sent if the Etag header matches the old version. You can probably try to disable If-None-Match header that is sent with your requests, but I wouldn't know how to do it. In any case, you should get the right data from the browser cache.
Regards,
Nicolas
Hello!
I wish you a pleasant stay and the outdoors!
I myself have not yet come to a definite conclusion, and do a more detailed study.
I guess the answers are correct.
And in my situation need to analyze the content of <body>
in their response.
But, I wanted to send a valid key once to get an answer 2xx-OK, but if the key is not correct then any other (4xx, for example).
I thought that everything will be easy.)))
But, I still spend testing, and will report their findings accurately.
Once again, I wish you good mood!
Hello,
If I understand correctly, you'd like to receive a 4xx status code if a key doesn't exist? Webdis handles all commands in the same way, and does not treat return values from GET in a special way: as long as Redis returns data, Webdis will return a 200. You can check the type of the reply in the JSON object to know more about what happened.
Nicolas
Hello! Happy New Year! I wish you success! Do I do not understand. Tell me how to do that properly I would get a HTTP/1.1 200 OK, only on request with the correct key I do so: Console check for entries:
# redis-cli keys '*'
1) example: mydata: 558255808376
to make http request: by doing this query:
http://192.168.0.90:7379/get/example:data:558255808376
-> response: HTTP/1.1 200 OKhttp://192.168.0.90:7379/get/example:data:558255808376
-> HTTP/1.1 304 Not Modified - this is a second request to the existing record but returns a response 304http://192.168.0.90:7379/get/example:data:558255808376.txt
-> response: HTTP/1.1 200 OKhttp://192.168.0.90:7379/get/example:data:558255808376.txt11111
-> response: HTTP/1.1 200 OK - we can change arbitrarily, but I still get 200http://192.168.0.90:7379/get/
-> response: HTTP/1.1 200 OK - it turns out that, in any case, what is the response we get.I hope that I could understand the idea explained to. Thank you for the answer!