Functions§
- extract_
json_ from_ sse - Check if the response body is SSE-formatted and extract the JSON data.
Returns the extracted JSON bytes if exactly one
data:event is found. - split_
upstream - Split a full upstream URL into (base, path). e.g. “http://localhost:9000/mcp” → (“http://localhost:9000”, “/mcp”) e.g. “http://localhost:9000” → (“http://localhost:9000”, “”)
- wrap_
as_ sse - Re-wrap JSON bytes into SSE format.