Skip to content

v18.3.0

Choose a tag to compare

@jterrazz jterrazz released this 24 Oct 21:30

A deployed API is an api spec with a url

specification.deployment() from 18.2.0 folds into specification.api(): the subject (an HTTP API) picks the kind, and where it runs is a target option, as website takes server or url (API specs § Deployed target (url), ADR-022).

  • specification.api({ url, timeout?, insecure?, ca?, recordedHeaders? }): exactly one of server / url, refused otherwise, in the type and at run time.
  • A deployed chain offers .get(), .request(), .headers(), .with() and .connect(address) (curl's --connect-to); .seed(), .intercept(), .clock(), .post(), .put(), .delete() and the result's table and disk are absent from its type and refused at run time.
  • result.response is the same response golden; a request that never answered is unreachable: refused | timeout | dns | reset | no route | tls <CODE>; result.tls carries the certificate and the trust verdict.
  • specification.deployment() and the deployment() project helper are removed (18.2.0 had no consumer and is deprecated).
  • msw's stub server now listens only while a chain's stubs are armed, so a deployed request in the same worker reaches the network untouched.

🤖 Generated with Claude Code