acumen/fetch_order
Fetch an existing ACME order.
Use this to check the status of an order after creating it or to poll for status changes during certificate issuance.
Example
import acumen
import acumen/fetch_order
import acumen/order.{type Order}
let assert Ok(#(resp, ctx)) = acumen.execute(
ctx,
build: fetch_order.build(existing_order.url, _, registered_key),
send: httpc.send,
)
let assert Ok(updated_order) = fetch_order.response(resp, existing_order.url)
Values
pub fn build(
url: url.Url,
context: acumen.Context,
key: acumen.RegisteredKey,
) -> Result(request.Request(String), acumen.AcmeError)
Builds a signed POST-as-GET request to fetch an existing order.
Used to poll order status during the authorization and finalization flow.
pub fn response(
resp: response.Response(String),
url url: url.Url,
) -> Result(order.Order, acumen.AcmeError)
Parses the order fetch response.
Pass the order URL since the response doesn’t include a Location header.