Hello I am running into an issue writing the response from from a restSharpRequest. It gets the data fine and writes the file fine. I want to print out the information to see what I am dealing with so I can store it in a sqlite database. WHen I loop through the information it only prints one letter at a time per line. so the console prints one letter at a time. Here is a screen shot.
- var restSharpClient = new RestClient("https://www.otcmarkets.com");
-
- var downloadRequest = new RestRequest("research/stock-screener/api/downloadCSV?pageSize=20",
- Method.GET);
-
- var fileInBytes = restSharpClient.DownloadData(downloadRequest);
-
- File.WriteAllBytes(@"C:\Users\OpenUser\Documents\Stock Reports\OTC\OTCStockData.csv",
- fileInBytes);
- IRestResponse response = restSharpClient.Execute(downloadRequest);
-
-
- foreach(var i in (dynamic)(response.Content))
- {
- Console.WriteLine(i);
- }
-