I must get the Content-Type of an
CodePudding user response:
The problem was that the User-Agent
header was not being sent, as @DiplomacyNotWar stated. After setting the User-Agent
header value it worked!
PS: I used the same User-Agent
of Google Chrome.
string browserUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36";
request.Headers.Add("User-Agent", browserUserAgent);