Fixing issue with service-style batches and requests with bodies

This commit is contained in:
Sérgio Gomes 2014-08-15 09:49:59 +01:00
parent 73e58f3098
commit f926429461
1 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,13 @@ module Google
:api_method => call.method,
:parameters => call.parameters
}
if call.respond_to? :body
if call.body.respond_to? :to_hash
base_call[:body_object] = call.body
else
base_call[:body] = call.body
end
end
@base_batch.add(base_call) do |base_result|
result = Google::APIClient::Service::BatchedCallResult.new(
call, base_result)