private HttpClient GetClient(IBoxRequest request) { HttpClient client = null; if (request.Timeout.HasValue) { var timeout = request.Timeout.Value; client = ClientFactory.CreateClientWithTimeout(request.FollowRedirect, timeout); } else { if (request.FollowRedirect) { client = ClientFactory.AutoRedirectClient; } else { client = ClientFactory.NonAutoRedirectClient; } } return(client); }