a2aproject / a2aproject/a2a-dotnet

Provide a way to pass per-request HTTP headers to client methods

オープン
#107 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
262
フォーク
64
平均マージ
5日 2時間
マージ済み PR(30日)
31

説明

For per "session" headers, a HttpClient instance with preconfigured headers can be passed into the constructor of the A2A Client.
https://github.com/a2aproject/a2a-dotnet/blob/aa35e9d66c3448fe83cc6dc2e6b236b7b5af868b/src/A2A/Client/A2AClient.cs#L22

However, for headers that need to be sent for a single request, there currently is no solution. Per-request headers are required for Authentication headers in a multi-user client agent.

## Option 1:

Add a new optional dictionary parameter to each client method that is used to populate the HTTP request headers before calling the server.

## Option 2:

Leverage the metadata property currently defined on request payloads, and possibly use the "extensions" mechanism to define a "https://a2aextensions.com/httpfields" extension that can be processed by the client before sending the request.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Examine the A2AClient constructor and methods in src/A2A/Client/A2AClient.cs to understand the current HTTP client usage. Review how request payloads handle metadata and extensions. Determine where to inject per-request headers, either via a new method parameter or through the existing metadata/extensions mechanism. Test by modifying a client method and verifying headers are sent correctly in a request.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
api, backend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。