class Seahorse::Client::Http::Response
def signal_done(options = {})
(**options)
-
:body
(required, String
) -- -
:headers
(required, Hash
) -- -
:status_code
(required, Integer
) --
Overloads:
-
signal_done(options = {})
-
signal_done()
Other tags:
- Example: Complete the response in parts -
Example: Completing the response in a single call -
def signal_done(options = {}) if options.keys.sort == [:body, :headers, :status_code] signal_headers(options[:status_code], options[:headers]) signal_data(options[:body]) signal_done elsif options.empty? @body.rewind if @body.respond_to?(:rewind) @done = true emit(:done) else msg = 'options must be empty or must contain :status_code, :headers, '\ 'and :body' raise ArgumentError, msg end end