Im trying to determine the content type of HtmlAgility.HtmlDocument. Any idea??
HtmlWeb web = new HtmlWeb();
var hDocument = web.Load(/*string*/ url);
I want to know how to find out the contentType of hDocument if possible, or if there is any work round it. Thanks
Basically what you want is the httpwebresponse object, to get this with hap you can use the taskcompletionsource class like this.
I have not done this in a while and didn't get a chance to test this code but it should work for what you want.
Get HttpWebResponse from Html Agility Pack HtmlWeb https://learn.microsoft.com/en-us/dotnet/api/system.net.httpwebresponse.contenttype?view=netframework-4.7.2