fix: Add Auth header to individual batch requests

* Fixes an issue where the authorization HTTP header wasn't
  being applied to individual batch requests.

[pr #822, refs #817]
This commit is contained in:
Egor Vorobiev authored and Mike Moore committed 2019-08-19 12:08:44 -06:00
1 parent 71a638b85d
commit 837cf00706
2 files changed
+4 -1

No files matched your search

+2
View File
@@ -177,6 +177,8 @@ module Google
call.header.each do |key, value|
request_head << sprintf("\r\n%s: %s", key, value)
end
token = call.options.authorization
request_head << "\r\nAuthorization: Bearer #{token}" unless token.nil?
request_head << sprintf("\r\nHost: %s", call.url.host)
request_head << "\r\n\r\n"
StringIO.new(request_head)