通过


HostedMcpServerTool.Headers 属性

定义

获取或设置调用远程 MCP 服务器时要包含的 HTTP 标头的可变字典。

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ Headers { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); void set(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ value); };
public System.Collections.Generic.IDictionary<string,string>? Headers { get; set; }
member this.Headers : System.Collections.Generic.IDictionary<string, string> with get, set
Public Property Headers As IDictionary(Of String, String)

属性值

注解

不保证基础提供程序支持或遵守标头。

此属性可用于指定 MCP 服务器所需的身份验证标头或其他标头。

由于 HTTP 标头名称不区分大小写,因此调用方在构造字典时应使用 OrdinalIgnoreCase 比较。

适用于