lib/basecrm/http_client.rb in basecrm-1.1.2 vs lib/basecrm/http_client.rb in basecrm-1.1.3

- old
+ new

@@ -78,12 +78,12 @@ raise ConnectionError, e.message end private def encode_params(params) - params.map { |k, v| + Hash[params.map { |k, v| v.is_a?(Array) ? [k, v.join(',')] : [k, v] - }.to_h + }] end def extract_body(res) content_type = res.headers['Content-Type'] content_type && content_type.include?('json') ? JSON.parse(res.body, symbolize_names: true) : res.body