52
53
54
55
56
57
58
59
60
61
|
# File 'lib/nf-conductor/http/connection.rb', line 52
def delete(url, args={})
Rails.logger.info("Conductor::Connection : DELETE #{url} with args #{args}") if Conductor.config.verbose
connection.delete do |req|
req.url url
req.['Content-Type'] = ( args[:headers] && args[:headers]['Content-Type'] || 'application/json' )
req.body = args[:body] if args[:body]
end
rescue Faraday::ParsingError
Struct.new(:status, :body).new(500, 'Conductor::Connection : Faraday failed to properly parse response.')
end
|