From e35008ab498f33f3df2550341c1a0daf0725a8c5 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Fri, 29 Aug 2025 12:38:25 -0300 Subject: [PATCH 1/2] [1.16] Adds Server-Sent Events docs Fixes https://github.com/dapr/docs/issues/4788 Signed-off-by: joshvanl --- .../service-invocation/howto-invoke-non-dapr-endpoints.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md index 7e5e35b8498..25c18eb4eb6 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md @@ -123,6 +123,13 @@ spec: key: tls.key ``` +### Server-Sent Events + +HTTP endpoints support [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). +To use SSE, set the `Accept` header to `text/event-stream` in the `HTTPEndpoint` resource or in the service invocation request. + +```yaml + ## Related Links - [HTTPEndpoint reference]({{% ref httpendpoints-schema %}}) From 986a8b90efd2b401556ae46d9f57ce54d4d31b52 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 3 Sep 2025 18:34:44 -0300 Subject: [PATCH 2/2] Adds an example of using sse headers Signed-off-by: joshvanl --- .../howto-invoke-non-dapr-endpoints.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md index 25c18eb4eb6..65f0e0d2304 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md @@ -125,10 +125,21 @@ spec: ### Server-Sent Events +SSE enables real-time communication with streaming servers and MCP servers. HTTP endpoints support [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). To use SSE, set the `Accept` header to `text/event-stream` in the `HTTPEndpoint` resource or in the service invocation request. ```yaml +apiVersion: dapr.io/v1alpha1 +kind: HTTPEndpoint +metadata: + name: "mcp-server" +spec: + baseUrl: https://my-mcp-server:443 + headers: + - name: "Accept" + value: "test/event-stream" +``` ## Related Links