HttpWebResponse with multiple URL causes error
问题 I have this code: public class WebDataDownloader { public string GetJSONFromURL(string url) { string file = string.empty; //*********get the json file using httpRequest *********** try { HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url); httpWebRequest.Method = WebRequestMethods.Http.Get; httpWebRequest.Accept = "application/json; charset=utf-8"; //httpWebRequest.UserAgent = @"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0