// given a url, retrieves the xml result set and returns the nodelist of Item objects private static XmlNodeList getXMLFromURL(string url) { logger.Debug("Sending the request: " + url.Replace(APIKey, "<apiKey>")); mvWebGrabber grabber = Utility.GetWebGrabberInstance(url); grabber.Encoding = Encoding.UTF8; grabber.Timeout = 5000; grabber.TimeoutIncrement = 10; if (grabber.GetResponse(APIKey)) { return(grabber.GetXML()); } else { logger.Debug("***** API ERROR *****: Code:{0} ({1})", grabber.errorCode, grabber.errorText); return(null); } }
// given a url, retrieves the xml result set and returns the nodelist of Item objects private static XmlNodeList getXMLFromURL(string url) { Logger.Debug("Sending the request: " + url.Replace(apikey, "<apikey>")); mvWebGrabber grabber = Utility.GetWebGrabberInstance(url); grabber.Encoding = Encoding.UTF8; grabber.Timeout = 5000; grabber.TimeoutIncrement = 10; grabber.Request.AutomaticDecompression = System.Net.DecompressionMethods.GZip; if (grabber.GetResponse(apikey)) { return(grabber.GetXML()); } else { return(null); } }