Expand description
Build-time HTTP.
One blocking GET against a shared agent. No retry, no streaming, no
resume, no download bookkeeping — deliberately. Resolvers run once, at
build time, against small JSON APIs; the install path has its own
downloader in opys-runtime and must never reach for this.
Structs§
- Http
Bytes - A response whose body is not text.
- Http
Error - Transport failure — DNS, TLS, connect, or a body that isn’t UTF-8. An
HTTP status is not one of these; it comes back in
HttpResponse. - Http
Response - A completed response. The body is read eagerly: build-time payloads are JSON documents measured in kilobytes, so there is nothing to stream.
Enums§
- Json
GetError - A build-time JSON GET that failed: the transport did, the server answered with a non-2xx, or the body was not the document expected.
Constants§
- OPYS_
USER_ AGENT - Identify ourselves: the bare agent string gets rejected or rate-limited by
some CDNs and by the CurseForge API. The patch component is omitted so the
string doesn’t churn against the version on every release. Mirrors
@opys/core’sOPYS_USER_AGENT.
Functions§
- get
- GET
urland read the whole body. Blocking: build-time resolvers are plain synchronous functions, parallelised withstd::thread::scopewhen they need it. - get_
bytes - GET
urland read the whole body as bytes. - get_
json - GET
urland parse the body asT. - post_
json - POST
bodyas JSON and read the whole response.