diff --git a/lib/twilio-ruby/base/client_base.rb b/lib/twilio-ruby/base/client_base.rb index fcf7a3552..7cc68277c 100644 --- a/lib/twilio-ruby/base/client_base.rb +++ b/lib/twilio-ruby/base/client_base.rb @@ -115,8 +115,14 @@ def generate_headers(method) headers['Content-Type'] = 'application/x-www-form-urlencoded' if method == 'POST' && !headers['Content-Type'] headers['Accept'] = 'application/json' unless headers['Accept'] + + headers.merge! @additional_headers if @additional_headers.present? return headers end + + def additional_headers(headers) + @additional_headers = headers + end end end end diff --git a/lib/twilio-ruby/rest/client.rb b/lib/twilio-ruby/rest/client.rb index 6e4f27d2c..95a745018 100644 --- a/lib/twilio-ruby/rest/client.rb +++ b/lib/twilio-ruby/rest/client.rb @@ -178,7 +178,8 @@ def verify end ## # Access the Video Twilio Domain - def video + def video(headers={}) + self.additional_headers(headers) @video ||= Video.new self end ##