Skip to Content
DevelopHTTP client

HTTP requests

Response continuation after recovery

Recorded HTTP outcomes replay unchanged. If a response body cannot continue after reconstruction (for example, its recorded prefix no longer matches or the server rejects the resume range), the WASI P3 stream reports the existing http-response-incomplete error code without semantic retry. This means response continuation was lost, not that the request did not execute. Reconcile the remote outcome before repeating business work. Storage outages remain infrastructure recovery (RecoveryRequired), not response-loss results.

HTTP requests can be made with the standard fetch function.

For example:

const response = await fetch(`http://localhost:${port}/todos`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ title: "foo", body: "bar", userId: 1, }), }); const data = await response.json(); console.log("Body:", data);

For WebSocket connections, see the WebSocket client page. The HTTP APIs described above do not support WebSocket upgrades.