Explorar el Código

Update README.md

Xiang Li hace 13 años
padre
commit
53e8782cd3
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      README.md

+ 5 - 1
README.md

@@ -369,9 +369,13 @@ The first server we set up should be the leader, if it has not dead during these
 Now we can do normal SET and GET operations on keys as we explored earlier.
 
 ```sh
-curl http://127.0.0.1:4001/v1/keys/foo -d value=bar
+curl http://127.0.0.1:4001/v1/keys/foo -d value=bar -L
 ```
+When the client sends a sensitive command (```set```, ```delete```, ```testAndset``` ) to the server, the command needs to be redirect to the leader of the cluster.
 
+So we add the ``` -L ``` flag to make curl follow location hints in http location header when there is a redirection http response.
+
+The response should be 
 ```json
 {"action":"SET","key":"/foo","value":"bar","newKey":true,"index":5}
 ```