Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# get the HTTP Headers of a GET request without body

I've got a bit of an odd problem. I'm trying to get the headers of a webpage WITHOUT the body being sent through. This request will happen often, so what I'm doing is checking the Last-Modified, Etag, and Content-Length headers for changes. But as the page I'm checking is large, I don't want to download the body.

I know that there is a specific HEAD request which can be used in C#, but when using this the server sends back different headers than the standard GET request. The HEAD request doesn't contain any of the headers that I'm looking for.

Anyone out there got any ideas?

like image 741
Hazz22 Avatar asked Dec 17 '25 17:12

Hazz22


1 Answers

Without using the HEAD request it is not possible .Better refer this link.

like image 76
Naren Avatar answered Dec 19 '25 12:12

Naren



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!