共用方式為


HttpClientBuilderExtensions.RedactLoggedHeaders 方法

定義

多載

RedactLoggedHeaders(IHttpClientBuilder, IEnumerable<String>)

設定應在記錄前修訂其值的 HTTP 標頭名稱集合。

RedactLoggedHeaders(IHttpClientBuilder, Func<String,Boolean>)

設定 Func<T,TResult>,其可決定是否在記錄前先修訂 HTTP 標頭值。

RedactLoggedHeaders(IHttpClientBuilder, IEnumerable<String>)

來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs

設定應在記錄前修訂其值的 HTTP 標頭名稱集合。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ RedactLoggedHeaders(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, System::Collections::Generic::IEnumerable<System::String ^> ^ redactedLoggedHeaderNames);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RedactLoggedHeaders (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Collections.Generic.IEnumerable<string> redactedLoggedHeaderNames);
static member RedactLoggedHeaders : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * seq<string> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function RedactLoggedHeaders (builder As IHttpClientBuilder, redactedLoggedHeaderNames As IEnumerable(Of String)) As IHttpClientBuilder

參數

redactedLoggedHeaderNames
IEnumerable<String>

應在記錄前修訂其值的 HTTP 標頭名稱集合。

傳回

IHttpClientBuilder

適用於

RedactLoggedHeaders(IHttpClientBuilder, Func<String,Boolean>)

來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs
來源:
HttpClientBuilderExtensions.cs

設定 Func<T,TResult>,其可決定是否在記錄前先修訂 HTTP 標頭值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ RedactLoggedHeaders(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Func<System::String ^, bool> ^ shouldRedactHeaderValue);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RedactLoggedHeaders (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Func<string,bool> shouldRedactHeaderValue);
static member RedactLoggedHeaders : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Func<string, bool> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function RedactLoggedHeaders (builder As IHttpClientBuilder, shouldRedactHeaderValue As Func(Of String, Boolean)) As IHttpClientBuilder

參數

shouldRedactHeaderValue
Func<String,Boolean>

Func<T,TResult>,其可決定是否在記錄前先修訂 HTTP 標頭值。

傳回

IHttpClientBuilder

備註

記錄時,會針對每個標頭值評估提供的 shouldRedactHeaderValue 述詞。 如果述詞傳回 true ,則標頭值將會取代為記錄中的標記值 * ;否則會記錄標頭值。

適用於