Skip to content

Commit 8287826

Browse files
JoshVanLmarcduikermsfussell
authored
[1.16] Adds Server-Sent Events docs (#4842)
* [1.16] Adds Server-Sent Events docs Fixes #4788 Signed-off-by: joshvanl <[email protected]> * Adds an example of using sse headers Signed-off-by: joshvanl <[email protected]> --------- Signed-off-by: joshvanl <[email protected]> Co-authored-by: Marc Duiker <[email protected]> Co-authored-by: Mark Fussell <[email protected]>
1 parent d6656a7 commit 8287826

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,24 @@ spec:
123123
key: tls.key
124124
```
125125

126+
### Server-Sent Events
127+
128+
SSE enables real-time communication with streaming servers and MCP servers.
129+
HTTP endpoints support [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
130+
To use SSE, set the `Accept` header to `text/event-stream` in the `HTTPEndpoint` resource or in the service invocation request.
131+
132+
```yaml
133+
apiVersion: dapr.io/v1alpha1
134+
kind: HTTPEndpoint
135+
metadata:
136+
name: "mcp-server"
137+
spec:
138+
baseUrl: https://my-mcp-server:443
139+
headers:
140+
- name: "Accept"
141+
value: "test/event-stream"
142+
```
143+
126144
## Related Links
127145

128146
- [HTTPEndpoint reference]({{% ref httpendpoints-schema %}})

0 commit comments

Comments
 (0)