I was looking through the code of my old project and I found this:
private async void send(HttpRequestMessage request, CancellationToken cancellationToken)
HttpResponseMessage response = await _client.SendAsync(request, cancellationToken);
I was wondering what would happen when it's cancelled?
The standard pattern is to cancel the returned task. This will cause your
await to raise an
What would be in the response?
There would be no response object, since the exception is thrown before that point.