From 5726da7b592c7f68524ecf2a0f91b52ee1e0b28d Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sat, 22 Feb 2014 18:47:09 -0800 Subject: [PATCH] website: Clarify the ?index parameter. Fixes #7 --- website/source/docs/agent/http.html.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/source/docs/agent/http.html.markdown b/website/source/docs/agent/http.html.markdown index 5eb152f7ba..0f0bd7a38b 100644 --- a/website/source/docs/agent/http.html.markdown +++ b/website/source/docs/agent/http.html.markdown @@ -28,10 +28,12 @@ Queries that support this will mention it specifically, however the use of this feature is the same for all. If supported, the query will set an HTTP header "X-Consul-Index". This is an opaque handle that the client will use. -To cause a query to block, the query parameters "?wait=60s&index=" are added +To cause a query to block, the query parameters "?wait=&index=" are added to a request. The "?wait=" query parameter limits how long the query will potentially -block for. It not set, it will default to 10 minutes. The "?index=" parameter is -what was returned in a "X-Consul-Index" header. +block for. It not set, it will default to 10 minutes. It can be specified in the form of +"10s" or "5m", which is 10 seconds or 5 minutes respectively. The "?index=" parameter is an +opaque handle, which is used by Consul to detect changes. The "X-Consul-Index" header for a +query provides this value, and can be used to wait for changes since the query was run. When provided, Consul blocks sending a response until there is an update that could have cause the output to change, and thus advancing the index. A critical