Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maryam Ziyad <maryamziyadm@gmail.com>
  • Loading branch information
MohamedSabthar and MaryamZi authored Aug 14, 2024
1 parent 54580a7 commit 2ed9e31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/http-sse-service/http_sse_service.bal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ballerina/random;

service /stocks on new http:Listener(9090) {
// This resource method returns a stream of `http:SseEvent` (with stock prices)
// to push real-time data to clients using server-event events (SSE).
// to push real-time data to clients using server-sent events (SSE).
resource function get .() returns stream<http:SseEvent, error?> {
// Create a new value of type `StockPriceEventGenerator` to generate stock price events.
StockPriceEventGenerator generator = new;
Expand Down
2 changes: 1 addition & 1 deletion examples/http-sse-service/http_sse_service.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTTP service - Server-sent events

Ballerina HTTP services support pushing real-time data to clients using Server-event events (SSE). A stream of type `http:SseEvent` can be returned from service resource methods. This feature automatically handles sending SSE and sets the content type to `text/event-stream` and the transfer encoding to chunked.
Ballerina HTTP services support pushing real-time data to clients using server-sent events (SSE). A stream of type `http:SseEvent` can be returned from service resource methods. This feature automatically handles sending SSE and sets the content type to `text/event-stream` and the transfer encoding to chunked.

::: code http_sse_service.bal :::

Expand Down

0 comments on commit 2ed9e31

Please sign in to comment.