Commit bea4746
Handle 202 Accepted response in HTTP client
The Streamable HTTP spec allows a server to respond 202 Accepted when
it has received the request but will deliver the response later via an
SSE stream. The client previously errored on 202 because the response
has no parseable Content-Type. Return `{ "accepted" => true }` so the
caller can decide how to proceed.
Actually picking up the deferred response requires listening on an SSE
stream (GET-for-SSE), which is not yet implemented. This PR only
prevents the hard error on a valid server response.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 9fcafa2 commit bea4746
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
372 | 387 | | |
373 | 388 | | |
374 | 389 | | |
| |||
0 commit comments