title: How to download Excel file with HttpClient instead of WebClient in .NET?
body: <p>I have the following code</p>
  <pre><code>private void SaveFile(string linkToFile, string filename)
  {
      using WebClient client = new();
      client.DownloadFile(linkToFile, ResourcePath + filename);
  }
  </code></pre>
  <p>So my question is, how can I download Excel file with HttpClient instead of WebClient?</p>