Web APIs
Response.body
Expose the response body as a readable byte stream, or null for a bodyless response. Reading through a reader consumes the body. Example console output: true true.
Formal Syntax & Structure
javascript syntaxjavascript
response.bodyReturn Value
ReadableStream or null
Body stream if present.
Working Example
Example Snippetjavascript
const r=new Response("a"); console.log(r.body instanceof ReadableStream,new Response(null,{status:204}).body===null);