Apiki_Buscape_API.Apiki_Buscape_API.GetContent C# (CSharp) Method

GetContent() private method

Recupera os dados do serviço BuscaPé.
private GetContent ( string url ) : string
url string URL para acesso ao serviço
return string
        private string GetContent(string url)
        {
            using (WebClient client = new WebClient())
            {
                try
                {
                    using (StreamReader reader = new StreamReader(client.OpenRead(url)))
                    {
                        return reader.ReadToEnd();
                    }
                }
                catch (WebException ex)
                {
                    throw ex;
                }
            }
        }