lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb in twilio-ruby-7.2.0
- old
+ new
@@ -147,12 +147,13 @@
##
# Fetch the WorkerChannelInstance
# @return [WorkerChannelInstance] Fetched WorkerChannelInstance
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)
WorkerChannelInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
worker_sid: @solution[:worker_sid],
@@ -173,11 +174,12 @@
data = Twilio::Values.of({
'Capacity' => capacity,
'Available' => available,
})
+ 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)
WorkerChannelInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
worker_sid: @solution[:worker_sid],