lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb in twilio-ruby-7.2.0

- old
+ new

@@ -60,12 +60,13 @@ 'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e }, 'Configuration.FlowSid' => configuration_flow_sid, 'Configuration.ReplayAfter' => configuration_replay_after, }) + 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) WebhookInstance.new( @version, payload, conversation_sid: @solution[:conversation_sid], ) @@ -184,21 +185,23 @@ ## # Delete the WebhookInstance # @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 WebhookInstance # @return [WebhookInstance] Fetched WebhookInstance 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) WebhookInstance.new( @version, payload, conversation_sid: @solution[:conversation_sid], sid: @solution[:sid], @@ -227,11 +230,12 @@ 'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e }, 'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e }, 'Configuration.FlowSid' => configuration_flow_sid, }) + 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) WebhookInstance.new( @version, payload, conversation_sid: @solution[:conversation_sid], sid: @solution[:sid],