public static ZimbraValues GetZimbraValues() { if (zimbraValues == null) { zimbraValues = new ZimbraValues(); } return(zimbraValues); }
public ZimbraValues() { zimbraValues = null; sUrl = ""; sAuthToken = ""; sServerVersion = ""; lDomains = new List <string>(); lCOSes = new List <CosInfo>(); lTags = new List <TagInfo>(); }
private HttpWebRequest CreateWebRequest() { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(this.Url); webRequest.ContentType = "application/soap+xml; charset=\"utf-8\""; webRequest.UserAgent = "ZimbraMigration" + "/" + ZimbraValues.GetZimbraValues().ClientVersion; webRequest.Method = "POST"; webRequest.Proxy = null; return(webRequest); }
public ZimbraValues() { zimbraValues = null; sUrl = ""; sAuthToken = ""; sServerVersion = ""; lDomains = new List<string>(); lCOSes = new List<CosInfo>(); lTags = new List<TagInfo>(); }
public ZimbraValues() { zimbraValues = null; sUrl = ""; sAuthToken = ""; sServerVersion = ""; sDefaultCosIndex = -1; lDomains = new List <string>(); lZimbraDomains = new List <DomainInfo>(); lCOSes = new List <CosInfo>(); }
private HttpWebRequest CreateWebRequest() { // using (LogBlock logblock = Log.NotTracing() ? null : new LogBlock(GetType() + "." + System.Reflection.MethodBase.GetCurrentMethod().Name)) { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(this.Url); webRequest.ContentType = "application/soap+xml; charset=\"utf-8\""; webRequest.UserAgent = "ZimbraMigration" + "/" + ZimbraValues.GetZimbraValues().ClientVersion; webRequest.Method = "POST"; webRequest.Proxy = null; return(webRequest); } }
private HttpWebRequest CreateWebRequestRaw(string authtoken, bool isServerMig) { CookieContainer cookieContainer = new CookieContainer(); Cookie cookie = (isServerMig) ? new Cookie("ZM_ADMIN_AUTH_TOKEN", authtoken) : new Cookie( "ZM_AUTH_TOKEN", authtoken); cookieContainer.Add(new Uri(this.Url), cookie); HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(this.Url); webRequest.CookieContainer = cookieContainer; webRequest.UserAgent = "ZimbraMigration" + "/" + ZimbraValues.GetZimbraValues().ClientVersion; webRequest.Method = "POST"; webRequest.Proxy = null; return(webRequest); }
private HttpWebRequest CreateWebRequestRaw(string authtoken, bool isServerMig) { //using (LogBlock logblock = Log.NotTracing() ? null : new LogBlock(GetType() + "." + System.Reflection.MethodBase.GetCurrentMethod().Name)) { // Get a cookie container containing ZM_ADMIN_AUTH_TOKEN or ZM_AUTH_TOKEN CookieContainer cookieContainer = new CookieContainer(); Cookie cookie = (isServerMig) ? new Cookie("ZM_ADMIN_AUTH_TOKEN", authtoken) : new Cookie("ZM_AUTH_TOKEN", authtoken); cookieContainer.Add(new Uri(this.Url), cookie); // Create the webRequest HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(this.Url); webRequest.CookieContainer = cookieContainer; webRequest.UserAgent = "ZimbraMigration" + "/" + ZimbraValues.GetZimbraValues().ClientVersion; webRequest.Method = "POST"; webRequest.Proxy = null; webRequest.Timeout = 10 * 60 * 1000; // 10 mins Log.verbose("Connection timeout is", webRequest.Timeout, "ms"); return(webRequest); } }
public static ZimbraValues GetZimbraValues() { if (zimbraValues == null) zimbraValues = new ZimbraValues(); return zimbraValues; }