import{ResponseSizeLimitError as i}from"../errors/response-size-limit.js";import{readStreamWithSizeLimit as t}from"./read-stream-with-size-limit.js";async function d(e,r=15){return e.body?await t({stream:e.body,maxSizeMB:r,onSizeExceededErrorHandler:()=>{throw new i(`Response size exceeded limit of ${r}MB`)}}):await e.arrayBuffer()}export{d as getBodyWithSizeCheck};
