I have a scenario where I navigate to a test site, but for whatever reason (connectivity issues, etc), sometimes, the test fails because it couldn’t reach the website. How do I ask for the HTTP header? I’m looking to check if it’s a 404, obviously, but I haven’t dealt with headers before.
Language of choice is C#, but I’m open.
Thanks for looking.
Make an HttpRequest (I’m not showing code for brevity), then set
HttpMethod = "HEAD"and when you call GetResponse method do something like this