Skip to content

Commit 573feee

Browse files
committed
fix: adjsut comment
1 parent 9cdb046 commit 573feee

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/server/express/rest_handler.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
364364
* Resubscribes to an existing task's updates via Server-Sent Events (SSE).
365365
* Useful for reconnecting to long-running tasks or receiving missed updates.
366366
*
367-
* GET is the canonical binding per the v1.0 proto's
368-
* `google.api.http` annotation:
369-
* `get: "/tasks/{id=*}:subscribe"`
370-
* POST is also accepted for tolerance with clients that copy the
371-
* pattern of the sibling `POST /tasks/{id}:cancel` binding.
367+
* Both GET and POST are accepted here because the v1.0 spec has
368+
* two normative sources that disagree on the HTTP method:
369+
* - `spec/a2a.proto`'s `google.api.http` annotation for
370+
* `SubscribeToTask` uses `get: "/tasks/{id=*}:subscribe"`.
371+
* - The spec markdown documents the operation as `POST`.
372372
*
373373
* @param req.params.taskId - Task identifier
374374
* @returns 200 OK with SSE stream of task status and artifact updates

0 commit comments

Comments
 (0)