lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb in twilio-ruby-7.2.0
- old
+ new
@@ -46,12 +46,13 @@
data = Twilio::Values.of({
'Identity' => identity,
'RoleSid' => role_sid,
})
+ 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)
InviteInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
channel_sid: @solution[:channel_sid],
@@ -179,20 +180,22 @@
##
# Delete the InviteInstance
# @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 InviteInstance
# @return [InviteInstance] Fetched InviteInstance
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)
InviteInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
channel_sid: @solution[:channel_sid],