Open this example in the interactive library
Source code
import { Blob } from "node:buffer";
console.log(
await new Request("https://example.org/", {
method: "POST",
body: JSON.stringify({ n: 3 }),
}).json(),
);
Sample output
{ n: 3 }
Open this example in the interactive library
import { Blob } from "node:buffer";
console.log(
await new Request("https://example.org/", {
method: "POST",
body: JSON.stringify({ n: 3 }),
}).json(),
);
{ n: 3 }