Automatically fall back from Streamable HTTP to SSE on the client by default (#456)
This commit is contained in:
parent
adb2098e4d
commit
317f468807
1 changed files with 489 additions and 49 deletions
23
src/ModelContextProtocol/Client/HttpTransportMode.cs
Normal file
23
src/ModelContextProtocol/Client/HttpTransportMode.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
namespace ModelContextProtocol.Client;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the transport mode for HTTP client connections.
|
||||
/// </summary>
|
||||
public enum HttpTransportMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Automatically detect the appropriate transport by trying Streamable HTTP first, then falling back to SSE if that fails.
|
||||
/// This is the recommended mode for maximum compatibility.
|
||||
/// </summary>
|
||||
AutoDetect,
|
||||
|
||||
/// <summary>
|
||||
/// Use only the Streamable HTTP transport.
|
||||
/// </summary>
|
||||
StreamableHttp,
|
||||
|
||||
/// <summary>
|
||||
/// Use only the HTTP with SSE transport.
|
||||
/// </summary>
|
||||
Sse
|
||||
}
|
||||
Loading…
Reference in a new issue