Skip to content

Commit

Permalink
Merge pull request #1 from Telmate/feature/VIDEO-4712-gvs-send-facili…
Browse files Browse the repository at this point in the history
…ty-id-header-to-smart-proxy

VIDEO-4712 Adding Facility_ID header to client_base request
  • Loading branch information
ewpeters authored Oct 2, 2024
2 parents 842e892 + 321aa87 commit 210173e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/twilio-ruby/base/client_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion lib/twilio-ruby/rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down

0 comments on commit 210173e

Please sign in to comment.