Class StreamableHttpTransport
A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI.
public record StreamableHttpTransport : IEquatable<StreamableHttpTransport>
- Inheritance
-
StreamableHttpTransport
- Implements
- Inherited Members
Properties
Headers
Optional: Fields for authentication headers, timeouts, etc., if needed.
[JsonPropertyName("headers")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, string>? Headers { get; set; }
Property Value
SseReadTimeout
Timeout for SSE read operations.
[JsonPropertyName("sseReadTimeout")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? SseReadTimeout { get; set; }
Property Value
TerminateOnClose
Whether to close the client session when the transport closes.
[JsonPropertyName("terminateOnClose")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? TerminateOnClose { get; set; }
Property Value
- bool?
Timeout
HTTP timeout for regular operations.
[JsonPropertyName("timeout")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Timeout { get; set; }
Property Value
Url
The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp".
[JsonPropertyName("url")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Url { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a StreamableHttpTransport object.
public static StreamableHttpTransport? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- StreamableHttpTransport
The deserialized StreamableHttpTransport object, or null if deserialization fails.