Change the RestApi get method to add ? only when query string is present