lib/plaid/connection.rb in plaid-1.5.0 vs lib/plaid/connection.rb in plaid-1.5.1
- old
+ new
@@ -23,32 +23,32 @@
def secure_get(path, access_token, options = {})
uri = build_uri(path)
options.merge!({access_token:access_token})
req = Net::HTTP::Get.new(uri)
req.body = URI.encode_www_form(options) if options
- req.content_type = 'multipart/form-data'
+ req.content_type = 'application/x-www-form-urlencoded'
res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') { |http| http.request(req) }
parse_response(res)
end
# API: semi-private
def patch(path, options = {})
uri = build_uri(path)
options.merge!(client_id: Plaid.customer_id, secret: Plaid.secret)
req = Net::HTTP::Patch.new(uri)
req.body = URI.encode_www_form(options) if options
- req.content_type = 'multipart/form-data'
+ req.content_type = 'application/x-www-form-urlencoded'
res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') { |http| http.request(req) }
parse_response(res)
end
# API: semi-private
def delete(path, options = {})
uri = build_uri(path)
options.merge!(client_id: Plaid.customer_id, secret: Plaid.secret)
req = Net::HTTP::Delete.new(uri)
req.body = URI.encode_www_form(options) if options
- req.content_type = 'multipart/form-data'
+ req.content_type = 'application/x-www-form-urlencoded'
Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') { |http| http.request(req) }
end
# API: semi-private
# TODO: Refactor these to use symbols instead of strings