IHttpClientAsyncLogger.LogRequestStartAsync Method
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 before sending an HTTP request.
public System.Threading.Tasks.ValueTask<object?> LogRequestStartAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken = default);
abstract member LogRequestStartAsync : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Public Function LogRequestStartAsync (request As HttpRequestMessage, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)
- request
- HttpRequestMessage
The HTTP request message that will be sent.
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
The task object representing the asynchronous operation. The result of the operation is a context object that will
be passed to a corresponding LogRequestStopAsync(Object, HttpRequestMessage, HttpResponseMessage, TimeSpan, CancellationToken) or LogRequestFailedAsync(Object, HttpRequestMessage, HttpResponseMessage, Exception, TimeSpan, CancellationToken). Can be null
if no context object is needed by the implementation.
The cancellation token was canceled. This exception is stored into the returned task.
Produk | Versi |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET maklum balas
.NET ialah projek sumber terbuka. Pilih pautan untuk memberikan maklum balas: