示例#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);
        }
示例#2
0
        public void UpdateChannels()
        {
#if DEBUG
            CrestronConsole.PrintLine("Getting IPTV Channel list ....");
#endif
            _server.GetRequest(new ServerRequest(_server.HostNameOrIpAddress, "/api/channels/portal", Callback));
        }
示例#3
0
        public void Discover()
        {
#if DEBUG
            CrestronConsole.PrintLine("Discovering IPTV Receivers....");
#endif
            _server.GetRequest(new ServerRequest(_server.HostNameOrIpAddress, "/api/devices/estate", Callback));
        }