語言

HostedMcpServerTool.Headers 屬性

定義

取得或設定一個可變的 HTTP 標頭字典,以便在呼叫遠端 MCP 伺服器時包含。

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 比較功能。

適用於