lib/twilio-ruby/rest/chat/v1/credential.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/chat/v1/credential.rb in twilio-ruby-7.2.0

- old
+ new

@@ -58,12 +58,13 @@ 'Sandbox' => sandbox, 'ApiKey' => api_key, 'Secret' => secret, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.create('POST', @uri, data: data) + payload = @version.create('POST', @uri, data: data, headers: headers) CredentialInstance.new( @version, payload, ) end @@ -180,21 +181,23 @@ ## # Delete the CredentialInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - @version.delete('DELETE', @uri) + @version.delete('DELETE', @uri, headers: headers) end ## # Fetch the CredentialInstance # @return [CredentialInstance] Fetched CredentialInstance def fetch + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.fetch('GET', @uri) + payload = @version.fetch('GET', @uri, headers: headers) CredentialInstance.new( @version, payload, sid: @solution[:sid], ) @@ -225,11 +228,12 @@ 'Sandbox' => sandbox, 'ApiKey' => api_key, 'Secret' => secret, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.update('POST', @uri, data: data) + payload = @version.update('POST', @uri, data: data, headers: headers) CredentialInstance.new( @version, payload, sid: @solution[:sid], )