Bagikan melalui


IHttpClientLogger.LogRequestFailed Metode

Definisi

Mencatat pengecualian yang terjadi saat mengirim permintaan HTTP.

public:
 void LogRequestFailed(System::Object ^ context, System::Net::Http::HttpRequestMessage ^ request, System::Net::Http::HttpResponseMessage ^ response, Exception ^ exception, TimeSpan elapsed);
public void LogRequestFailed (object? context, System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpResponseMessage? response, Exception exception, TimeSpan elapsed);
abstract member LogRequestFailed : obj * System.Net.Http.HttpRequestMessage * System.Net.Http.HttpResponseMessage * Exception * TimeSpan -> unit
Public Sub LogRequestFailed (context As Object, request As HttpRequestMessage, response As HttpResponseMessage, exception As Exception, elapsed As TimeSpan)

Parameter

context
Object

Objek konteks yang sebelumnya dikembalikan oleh LogRequestStart(HttpRequestMessage).

request
HttpRequestMessage

Pesan permintaan HTTP yang dikirim.

response
HttpResponseMessage

Jika tersedia, pesan respons HTTP yang diterima, dan null sebaliknya.

exception
Exception

Pengecualian yang terjadi selama memproses permintaan HTTP.

elapsed
TimeSpan

Waktu berlalu sejak memanggil LogRequestStart(HttpRequestMessage).

Berlaku untuk