lib/api_client/connection/basic.rb in api_client-0.2.0 vs lib/api_client/connection/basic.rb in api_client-0.3.0

- old
+ new

@@ -28,13 +28,11 @@ # * path - the path the request should go to # * data - (optional) the query, passed as a hash and converted into query params # * headers - (optional) headers sent along with the request # def get(path, data = {}, headers = {}) - query = Faraday::Utils.build_nested_query(data || {}) - path = [path, query].join('?') unless query.empty? - handle_response @handler.get(path, headers) + handle_response @handler.get(path, data, headers) end #### ApiClient::Connection::Abstract#post # Performs a POST request # Accepts three parameters: @@ -69,12 +67,10 @@ # * data - (optional) the query, passed as a hash and converted into query params # * headers - (optional) headers sent along in the request # # This method automatically adds the application token header def delete(path, data = {}, headers = {}) - query = Faraday::Utils.build_nested_query(data || {}) - path = [path, query].join('?') unless query.empty? - handle_response @handler.delete(path, headers) + handle_response @handler.delete(path, data, headers) end private def handle_response(response)