Bagikan melalui


HttpClientBuilderExtensions.RedactLoggedHeaders Metode

Definisi

Overload

RedactLoggedHeaders(IHttpClientBuilder, IEnumerable<String>)

Mengatur koleksi nama header HTTP yang nilainya harus disunting lebih dahulu sebelum masuk.

RedactLoggedHeaders(IHttpClientBuilder, Func<String,Boolean>)

Func<T,TResult> Mengatur yang menentukan apakah akan meredaksi nilai header HTTP sebelum pengelogan.

RedactLoggedHeaders(IHttpClientBuilder, IEnumerable<String>)

Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs

Mengatur koleksi nama header HTTP yang nilainya harus disunting lebih dahulu sebelum masuk.

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

Parameter

redactedLoggedHeaderNames
IEnumerable<String>

Kumpulan nama header HTTP yang nilainya harus diredaksi sebelum pengelogan.

Mengembalikan

IHttpClientBuilder.

Berlaku untuk

RedactLoggedHeaders(IHttpClientBuilder, Func<String,Boolean>)

Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs
Sumber:
HttpClientBuilderExtensions.cs

Func<T,TResult> Mengatur yang menentukan apakah akan meredaksi nilai header HTTP sebelum pengelogan.

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

Parameter

shouldRedactHeaderValue
Func<String,Boolean>

Func<T,TResult> yang menentukan apakah akan meredaksi nilai header HTTP sebelum pengelogan.

Mengembalikan

IHttpClientBuilder.

Keterangan

Predikat yang disediakan shouldRedactHeaderValue akan dievaluasi untuk setiap nilai header saat pengelogan. Jika predikat mengembalikan true maka nilai header akan diganti dengan nilai * penanda dalam log; jika tidak, nilai header akan dicatat.

Berlaku untuk