gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite982c26de982c26dlog: HM65 mergedmree982c26d/plugins/fetch/fetch_response.hl

1.3 KB

  1. \* One answered request. Handed back by `fetch()` and by `PendingFetch.response()`
  2. — never `new`ed. Its shape is exactly what the native side builds
  3. (`buildResponse` in fetch.zig): status, ok, url, headers, body, tag, folded in
  4. with `>`.
  5. RESTORED 2026-08-29 (mission 257). `pending_fetch.hl` has always ended in
  6. `r > new FetchResponse()`, but this file was not in the tree — so EVERY
  7. `fetch()` and every `.response()` died with a bare `error.UndefinedVariable`
  8. at `pending_fetch.hl:42`, which is the second half of the wall the creator
  9. hit. It was invisible for the same reason the stale `.so` was: no gate ever
  10. ran a fetch against a server it started itself. *\
  11. Number status = 0 \\ the HTTP status of the final response (after redirects)
  12. Boolean ok = false \\ true for 2xx
  13. String url = '' \\ the FINAL url — the last hop of a redirect chain
  14. Hybrid headers = {} \\ response headers, names LOWERCASED
  15. String body = '' \\ the body as it arrived (empty for a streamed fetch)
  16. String tag = '' \\ whatever `tag` the request carried, echoed back
  17. // The body as a String. The bytes are already here — this is a reader, not a
  18. // second wait — so it is safe to call as often as you like.
  19. text() {
  20. return body
  21. }
  22. // The body parsed as JSON. A body that is not JSON raises, like JSON.parse
  23. // anywhere else; `on Error` catches it.
  24. json() {
  25. return JSON.parse(body)
  26. }

Branches

Latest commits

  • e982c26dlog: HM65 mergedmre
  • 6e72f9d1Merge hm65-fields: episode boot scan reads three fieldsmre
  • 07a5c883HM65 report measured field projection and complete validationmre
  • 0eab858fRead only catalog date fields during the episode boot scanmre
  • d3179273log: HM65 hl:heap vendoringmre
  • cb78a1a0HM65 report missing heap diagnostic package with repromre
  • 89606a5cHM65 briefmre
  • 096ce0d4log: DP69 live on day48mre
  • b3d8a80bDP69 brief, RV48 mergedmre
  • ce6d7d32Merge rv48: Hybriel day48mre
  • 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
  • 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
  • 4a802ae7status: RV48 runningmre
  • 0a5412b6RV48 brief, day48 outmre
  • 56665efelog: CB69 mergedmre
  • 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
  • e55b379dKeep shared app title independent of the route import graphmre
  • 9a99659blog: hybriel#334, batch waits for day48mre
  • 85fa6c9blog: CB68 result, CB69 startedmre
  • 2f07c1b7log: DP68 boot gate failed, CB68mre