title: How does a request cancellation token actually get marked for cancellation?
body: <p>I'm looking for some more information on what actually causes <code>IsCancellationRequested</code> to become set for a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-6.0" rel="nofollow noreferrer">cancellation token</a>.</p>
  <p>I see plenty of articles and videos stating to just throw the token in a <code>httpClient.PostAsync()</code> call and then we can check the property of <code>IsCancellationRequested</code> on the token that we pass in and do our cancellation processing if it's requested. I also see that we can use the token source to call cancel for it as well.</p>
  <p>My confusion here is around me sending a request to an endpoint that I own and what triggers the <code>IsCancellationRequested</code> property to become set as true on my response. Will this become set as true on any exception thrown? And is this only possible to set as true on an exception being thrown? I don't full understand the role the server has in requesting a cancellation.</p>