lib/twilio-ruby/rest/messaging/v1/service.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/messaging/v1/service.rb in twilio-ruby-7.2.0
- old
+ new
@@ -85,12 +85,13 @@
'SynchronousValidation' => synchronous_validation,
'Usecase' => usecase,
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
})
+ 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)
ServiceInstance.new(
@version,
payload,
)
end
@@ -213,21 +214,23 @@
##
# Delete the ServiceInstance
# @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 ServiceInstance
# @return [ServiceInstance] Fetched ServiceInstance
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)
ServiceInstance.new(
@version,
payload,
sid: @solution[:sid],
)
@@ -288,11 +291,12 @@
'SynchronousValidation' => synchronous_validation,
'Usecase' => usecase,
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
})
+ 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)
ServiceInstance.new(
@version,
payload,
sid: @solution[:sid],
)