@@ -87,6 +87,7 @@ func (c *Client) DeleteWorkspace(ctx context.Context, id string) error {
87// SubscribeEvents subscribes to server-sent events for a workspace.
87// SubscribeEvents subscribes to server-sent events for a workspace.
88func (c *Client) SubscribeEvents(ctx context.Context, id string) (<-chan any, error) {
88func (c *Client) SubscribeEvents(ctx context.Context, id string) (<-chan any, error) {
89 events := make(chan any, 100)
89 events := make(chan any, 100)
90 rsp, err := c.get(ctx, fmt.Sprintf("/workspaces/%s/events", id), nil, http.Header{
91 rsp, err := c.get(ctx, fmt.Sprintf("/workspaces/%s/events", id), nil, http.Header{
91 "Accept": []string{"text/event-stream"},
92 "Accept": []string{"text/event-stream"},
92 "Cache-Control": []string{"no-cache"},
93 "Cache-Control": []string{"no-cache"},