From ee159b255fbf77c04d8a68ec573d195e6fbe0791 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Sun, 8 Nov 2015 19:56:34 +0900 Subject: doc: update --- lib/plum/client.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/plum/client.rb b/lib/plum/client.rb index 64452f3..cd1315b 100644 --- a/lib/plum/client.rb +++ b/lib/plum/client.rb @@ -53,7 +53,7 @@ module Plum self end - # Waits for the asynchronous response(s) to finish. + # Resume communication with the server, until the specified (or all running) requests are complete. # @param response [Response] if specified, waits only for the response # @return [Response] if parameter response is specified def wait(response = nil) @@ -65,7 +65,7 @@ module Plum end end - # Waits for the response headers. + # Resume communication with the server until the response headers are sent. # @param response [Response] the incomplete response. def wait_headers(response) @session.succ while !response.failed? && !response.headers @@ -92,6 +92,7 @@ module Plum # @param headers [Hash] the request headers # @param body [String] the request body # @param options [Hash] the request options + # @param block [Proc] if passed, it will be called when received response headers. def request(headers, body, options = {}, &block) wait request_async(headers, body, options, &block) end -- cgit v1.2.3