IHttpClientAsyncLogger.LogRequestStopAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Logs after receiving an HTTP response.
public System.Threading.Tasks.ValueTask LogRequestStopAsync (object? context, System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpResponseMessage response, TimeSpan elapsed, System.Threading.CancellationToken cancellationToken = default);
abstract member LogRequestStopAsync : obj * System.Net.Http.HttpRequestMessage * System.Net.Http.HttpResponseMessage * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function LogRequestStopAsync (context As Object, request As HttpRequestMessage, response As HttpResponseMessage, elapsed As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As ValueTask
Parameters
- context
- Object
The context object that was previously returned by LogRequestStartAsync(HttpRequestMessage, CancellationToken).
- request
- HttpRequestMessage
The HTTP request message that was sent.
- response
- HttpResponseMessage
The HTTP response message that was received.
- elapsed
- TimeSpan
Time elapsed since calling LogRequestStartAsync(HttpRequestMessage, CancellationToken).
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
The task object representing the asynchronous operation.
Exceptions
The cancellation token was canceled. This exception is stored into the returned task.