title: C# HttpClient refresh token strategy
body: <p>Since Microsoft <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.7" rel="noreferrer">recommends</a> that the <code>HttpClient</code> be created once and reused throughout the life of a program, I wondering how to update <code>DefaultRequestHeaders</code> when for example, the token has expired and need to be refresh.</p>
  
  <p><code>DefaultRequestHeaders</code> is more over not thread safe (for what I know) and the list of headers defined there, shared by all potentially pending requests. <code>Clear()</code> the list and <code>Add()</code> the header with a new token, seems not the wise thing to do.</p>
  
  <hr>
  
  <h3>Update</h3>
  
  <p>To be more precise, I don't want/need to change request headers for every request. Only when I've got a HTTP 401 status code. </p>