❔ Catching an error status code in HTML agility pack when using LoadFromWebAsync
I'm using HTML agility pack to request multiple web pages simultaneously. I'm struggling to see how I can safely do error handling when using
LoadFromWebAsync()
however, given that the returned result does not include any status code, and the only way to check the http response code is via a callback on the HtmlWeb instance or via a public property. Is there a way I can catch and handle http error codes in a thread safe way?
The only option I see would be to use the HtmlWeb.PostResponse
callback, but I'm not sure how I could use that to cleanly handle error status codes in those specific tasks.1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.