From f14d2aed91986f1acc217944fe3c124713c4d759 Mon Sep 17 00:00:00 2001 From: raghuveer5465 Date: Tue, 15 Sep 2026 14:15:05 +0530 Subject: [PATCH] Update index.md --- files/en-us/web/api/fetch_api/using_fetch/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/api/fetch_api/using_fetch/index.md b/files/en-us/web/api/fetch_api/using_fetch/index.md index 1b56705f00f20c9..183247cb062522b 100644 --- a/files/en-us/web/api/fetch_api/using_fetch/index.md +++ b/files/en-us/web/api/fetch_api/using_fetch/index.md @@ -113,13 +113,15 @@ const request = new Request("https://example.org/post", { method: "POST", body: JSON.stringify({ username: "example" }), }); - +async function main(){ const response1 = await fetch(request); console.log(response1.status); // Will throw: "Body has already been consumed." const response2 = await fetch(request); console.log(response2.status); +} +main(); ``` Instead, you would need to {{domxref("Request.clone()", "create a clone", "", "nocode")}} of the request before sending it: