function s(e){return e instanceof Error&&e.name==="AbortError"}function u(e,o){return s(e)?o:e instanceof Error?e.message:"Network request failed"}function l({requesterOptions:e={}}={}){async function o(n){let i=new AbortController,c=i.signal,a=t=>setTimeout(()=>{i.abort()},t),m=a(n.connectTimeout),r;try{r=await fetch(n.url,{method:n.method,body:n.data||null,redirect:"manual",signal:c,...e,headers:{...e.headers,...n.headers}})}catch(t){return{status:0,content:u(t,"Connection timeout"),isTimedOut:s(t)}}clearTimeout(m),a(n.responseTimeout);try{return{content:await r.text(),isTimedOut:!1,status:r.status}}catch(t){return{status:0,content:u(t,"Socket timeout"),isTimedOut:s(t)}}}return{send:o}}export{l as createFetchRequester};
//# sourceMappingURL=requester.fetch.browser.js.map