IHttpClientLogEnricher.Enrich 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擴充 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 要求相關聯的物件。
備註
請注意,視 HTTP 要求的結果而定, response
和 exception
參數可能是 null
。