RovioLib.RovioWebClient.RequestData C# (CSharp) Method

RequestData() public method

Web request for byte data to the Rovio API
public RequestData ( string cmd ) : byte[]
cmd string Command of the Rovio API to execute
return byte[]
        public byte[] RequestData(string cmd)
        {
            WebClient wc = new WebClient();
            wc.Credentials = settings.RovioCredentials;
            wc.BaseAddress = settings.RovioAddress;
            Uri targetUri = new Uri(new Uri(wc.BaseAddress), cmd);
            try
            {
                return wc.DownloadData(targetUri);
            }
            catch (WebException e)
            {
                //TODO: Do something
                return null;
            }
        }