HttpDiagnosticsHttpWebRequestExtensions.SetRequestMetadata 方法

定义

设置要用于遥测的传出请求的元数据。

public:
[System::Runtime::CompilerServices::Extension]
 static void SetRequestMetadata(System::Net::HttpWebRequest ^ request, Microsoft::Extensions::Http::Diagnostics::RequestMetadata ^ metadata);
public static void SetRequestMetadata (this System.Net.HttpWebRequest request, Microsoft.Extensions.Http.Diagnostics.RequestMetadata metadata);
static member SetRequestMetadata : System.Net.HttpWebRequest * Microsoft.Extensions.Http.Diagnostics.RequestMetadata -> unit
<Extension()>
Public Sub SetRequestMetadata (request As HttpWebRequest, metadata As RequestMetadata)

参数

request
HttpWebRequest

HttpWebRequest 对象。

metadata
RequestMetadata

请求的元数据。

适用于