Asp.net core 如何通过HttpWebRequest在Asp.net内核中动态呈现角度(typescript)html?
我想从.NETCore通过HttpWebRequest获得完整的角度html 我尝试过使用HttpWebRequest,我也得到了html,但在这种情况下没有加载。我得到了index.html页面,但是里面的html没有加载到.NETCore中Asp.net core 如何通过HttpWebRequest在Asp.net内核中动态呈现角度(typescript)html?,asp.net-core,angular5,Asp.net Core,Angular5,我想从.NETCore通过HttpWebRequest获得完整的角度html 我尝试过使用HttpWebRequest,我也得到了html,但在这种情况下没有加载。我得到了index.html页面,但是里面的html没有加载到.NETCore中 private string GetPageContent(string url){ var httpRequest = System.Net.HttpWebRequest.Create(url); httpRequest.Tim
private string GetPageContent(string url){
var httpRequest = System.Net.HttpWebRequest.Create(url);
httpRequest.Timeout = (int)TimeSpan.FromSeconds(60).TotalMilliseconds;
var sr = new System.IO.StreamReader(httpRequest.GetResponse().GetResponseStream());
string result = sr.ReadToEnd();
sr.Close();
return result;
}
我希望结果的输出是带有角度加载的html,这意味着我需要选择器的内部html,但预期的输出是没有角度加载的html。angular在客户端通过javascript创建html标记。要接收生成的html,您可以使用Selenium,它使用浏览器准备标记