Add client-side Streamable HTTP transport support (#356)

This commit is contained in:
Stephen Halter 2025-04-30 17:21:43 -07:00 • committed by GitHub
commit e913d80f05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,6 +57,11 @@ public sealed class SseClientTransport : IClientTransport, IAsyncDisposable
/// <inheritdoc />
public async Task<ITransport> ConnectAsync(CancellationToken cancellationToken = default)
{
if (_options.UseStreamableHttp)
{
return new StreamableHttpClientSessionTransport(_options, _httpClient, _loggerFactory, Name);
}
var sessionTransport = new SseClientSessionTransport(_options, _httpClient, _loggerFactory, Name);
try