共用方式為


IHttpClientLogEnricher.Enrich 方法

定義

擴充 HTTP 用戶端要求記錄。

public:
 void Enrich(Microsoft::Extensions::Diagnostics::Enrichment::IEnrichmentTagCollector ^ collector, System::Net::Http::HttpRequestMessage ^ request, System::Net::Http::HttpResponseMessage ^ response, Exception ^ exception);
public void Enrich (Microsoft.Extensions.Diagnostics.Enrichment.IEnrichmentTagCollector collector, System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpResponseMessage? response, Exception? exception);
abstract member Enrich : Microsoft.Extensions.Diagnostics.Enrichment.IEnrichmentTagCollector * System.Net.Http.HttpRequestMessage * System.Net.Http.HttpResponseMessage * Exception -> unit
Public Sub Enrich (collector As IEnrichmentTagCollector, request As HttpRequestMessage, response As HttpResponseMessage, exception As Exception)

參數

collector
IEnrichmentTagCollector

要加入標記的標籤收集器。

request
HttpRequestMessage

HttpRequestMessage 與傳出 HTTP 要求相關聯的物件。

response
HttpResponseMessage

HttpResponseMessage 與傳出 HTTP 要求相關聯的物件。

exception
Exception

在傳出 HTTP 要求處理內擲回的選擇性 Exception

備註

請注意,視 HTTP 要求的結果而定, responseexception 參數可能是 null

適用於