Commit 464765e
feat(stdlib): add httpPostJson async-extern for out-of-process JSON POST (#210)
Adds `pub extern fn httpPostJson(url, body_json) -> Thenable / Async`
to stdlib/Vscode.affine plus the canonical runtime impl in
packages/affine-vscode/mod.js, following the exact #205 thenable
convention (reg the response Thenable; guest observes via thenableThen
/ thenableResultJson, same as languageClientSendRequest).
Motivation: lets a VS Code extension reach a BoJ-server cartridge
endpoint (e.g. reposystem_run_audit on :7700) as a real in-process
request rather than shelling a CLI. Unblocks the BoJ-primary tier of
the rsr-certifier extension rewire (PR-5d-B).
Resolves/rejects settle as { __error } (same shape thenableThen uses
for rejections) so guests can branch to a fallback. Full dune gate
green (257/257), zero regression.
Refs #103 #199 #205
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 73f16b9 commit 464765e
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
366 | 387 | | |
367 | 388 | | |
368 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
0 commit comments