次の方法で共有


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 比較を使用する必要があります。

適用対象