add sse streaming to sdk

This commit is contained in:
Dax Raad
2025-08-22 18:30:25 -04:00
parent 6e626afdcb
commit 0f1697b2ab
18 changed files with 497 additions and 172 deletions

View File

@@ -41,6 +41,7 @@ func (r *EventService) ListStreaming(ctx context.Context, opts ...option.Request
err error
)
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "text/event-stream")}, opts...)
path := "event"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &raw, opts...)
return ssestream.NewStream[EventListResponse](ssestream.NewDecoder(raw), err)