class Seahorse::Client::Plugins::RequestCallback::ReadCallbackHandler
@api private
Public Instance Methods
call(context)
click to toggle source
# File lib/seahorse/client/plugins/request_callback.rb, line 108 def call(context) if (callback = context[:on_chunk_sent]) context.http_request.body = ReadCallbackIO.new( context.http_request.body, callback ) @handler.call(context).tap do unwrap_callback_body(context) end else @handler.call(context) end end
unwrap_callback_body(context)
click to toggle source
# File lib/seahorse/client/plugins/request_callback.rb, line 122 def unwrap_callback_body(context) body = context.http_request.body if body.is_a? ReadCallbackIO context.http_request.body = body.io end end