IRestClient CreateClient(string baseUrl = null, bool truncateLargeLists = false)
        {
            var client = new RestClient(baseUrl ?? connection.Url)
            {
                Authenticator = new NtlmAuthenticator()
            };

            client.ClearHandlers();
            client.AddJsonDeserializer(truncateLargeLists ? jsonTruncatingDeserializer : jsonDeserializer);
            client.AddXmlDeserializer(new XmlDeserializer());
            client.AddDefaultHeader("Accept-Encoding", "gzip,deflate");

            return(client);
        }