Jason Miller
Jason Miller
ooooh you're so right! this is a great optimization.
Alright I think I found an issue with this approach: `getResponseHeader(key)` is awesome because it gives us case-insensitive `headers.{get,has}()`, but it might cause problems with multiple headers of the same...
Thanks for digging so deeply into this one! I think I was remembering the old `.get()` behavior, and forgot that concat was already what we return for get(). I think...
So we'd need a new npm package that exports a standalone polyfill for `AbortController`, and then the only modifications needed to unfetch would be to proxy `signal.onabort = request.abort`. Seems...
Hi @3F - I'm not sure many libraries can be made to work just by aliasing XMLHttpRequest to XDomainRequest, since there are bugs in XDR that can cause requests to...
I'd be willing to do something like this if it doesn't increase filesize: ```js xhr.onreadystatechange = () => { if (xhr.readyState==4) { if (xhr.status/100|0) == 2) resolve(response()); else reject(Error()); }...
Ah you're right - I was forgetting `resolve()` is called even if the status is `not ok` (outside [200,399]). Given that, your `if (xhr.status) resolve(response())` would work. My point about...
This will depend on the size impact - I've updated the repo to include a size check, we'll see what it nets.
Ah - it looks like this adds a named export to the actual unfetch package, which means it won't work - folks using CommonJS will have to do `import('unfetch').default` which...
@kalisjoshua that'll be the added export. One quick solution to check this would be to move the `response` function into a separate file (`src/lib/response.mjs`) that is imported by `src/index.mjs` and...