handle both data and params in RestClient methods