diff options
author | Loïc Hoguin <[email protected]> | 2015-03-28 20:53:12 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-03-28 20:53:12 +0100 |
commit | 30dacf0f4ba27fe8659e6f02934a72773370d3d5 (patch) | |
tree | 76c98fcea3a53d0003af285a94025759ed535bdd /doc/src | |
parent | 4ae8967785f2a01a9eacf12a5ff0710f393ba053 (diff) | |
download | gun-30dacf0f4ba27fe8659e6f02934a72773370d3d5.tar.gz gun-30dacf0f4ba27fe8659e6f02934a72773370d3d5.tar.bz2 gun-30dacf0f4ba27fe8659e6f02934a72773370d3d5.zip |
Clarify the await functions in the guide
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/guide/http.asciidoc | 12 |
1 files changed, 8 insertions, 4 deletions
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 |