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

- old
+ new

@@ -61,12 +61,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, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:conversation_sid], @@ -187,21 +188,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, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:conversation_sid], @@ -231,11 +234,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, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:conversation_sid],