lib/ruby_branch/api/request.rb in ruby_branch-0.2.0 vs lib/ruby_branch/api/request.rb in ruby_branch-1.0.0
- old
+ new
@@ -18,9 +18,17 @@
request.body = body unless body.empty?
end
Response.new(response)
end
+ def delete(resource)
+ response = connection.delete do |request|
+ request.url resource
+ request.headers['Content-Type'] = 'application/json'
+ end
+ Response.new(response)
+ end
+
def connection
@connection ||=
Faraday.new(url: BRANCH_API_ENDPOINT) do |connection|
connection.adapter Faraday.default_adapter
end