From 30dacf0f4ba27fe8659e6f02934a72773370d3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 28 Mar 2015 20:53:12 +0100 Subject: Clarify the await functions in the guide --- doc/src/guide/http.asciidoc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/src/guide/http.asciidoc b/doc/src/guide/http.asciidoc index 929860a..5a69fa1 100644 --- a/doc/src/guide/http.asciidoc +++ b/doc/src/guide/http.asciidoc @@ -289,12 +289,16 @@ You can also use Gun in a synchronous manner by using the _await_ functions. The `gun:await/{2,3,4}` function will wait until it receives -a response. The `gun:await/2` call will automatically monitor -the process and use a timeout of 5000. The monitor and the -timeout can be passed by using `gun:await/3` or `gun:await/4`. +a response to, a pushed resource related to, or data from +the given stream. + +When calling `gun:await/{2,3}` and not passing a monitor +reference, one is automatically created for you for the +duration of the call. The `gun:await_body/{2,3,4}` works similarly, but returns the -body received. +body received. Both functions can be combined to receive the +response and its body sequentially. .Receiving a response using await -- cgit v1.2.3