public AGConnectMessagingClient(AppOptions options)
        {
            this.options = options;
            TokenUrl     = options.LoginUri;
            sendUrl      = options.GetApiUri();
#if PROXY
            httpClient = new HttpClient(new HttpClientHandler()
            {
                UseProxy = true,
                // Use cntlm proxy setting to accesss internet.
                Proxy = new WebProxy("localhost", 3128),
            });
#else
            httpClient = new HttpClient();
#endif
        }