Exemple #1
0
        private void GetRequest(string uri, HTTPClientResponseCallback callback)
        {
            var request = new ServerRequest(IpAddress, uri, callback);
            var auth    = Convert.ToBase64String(Encoding.ASCII.GetBytes(_username + ":" + _password));

            request.Header.AddHeader(new HttpHeader("Authorization", "Basic " + auth));
            _server.GetRequest(request);
        }
        public void UpdateChannels()
        {
#if DEBUG
            CrestronConsole.PrintLine("Getting IPTV Channel list ....");
#endif
            _server.GetRequest(new ServerRequest(_server.HostNameOrIpAddress, "/api/channels/portal", Callback));
        }
        public void Discover()
        {
#if DEBUG
            CrestronConsole.PrintLine("Discovering IPTV Receivers....");
#endif
            _server.GetRequest(new ServerRequest(_server.HostNameOrIpAddress, "/api/devices/estate", Callback));
        }