a2aproject / a2aproject/a2a-dotnet

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

Offen
#107 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
262
Forks
64
Ø Merge
5 T. 2 Std.
Gemergte PRs (30 T.)
31

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.