lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-7.2.0

- old
+ new

@@ -51,12 +51,13 @@ 'UniqueName' => unique_name, 'Attributes' => attributes, 'Type' => type, }) + 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) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid], ) @@ -185,21 +186,23 @@ ## # Delete the ChannelInstance # @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 ChannelInstance # @return [ChannelInstance] Fetched ChannelInstance 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) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], @@ -222,11 +225,12 @@ 'FriendlyName' => friendly_name, 'UniqueName' => unique_name, 'Attributes' => attributes, }) + 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) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],