Releases: unjs/ofetch
Releases · unjs/ofetch
v1.4.1
🩹 Fixes
- Remove undefined
methodandquery/paramsfrom fetch options for older chrome compat (#451) - Use
response._bodyInitas fallback for react-native and qq (#398)
✅ Tests
- Fix typo (#448)
❤️ Contributors
- Joshua Sosso (@joshmossas)
- Pooya Parsa (@pi0)
- @beer (@iiio2)
- Cooper Roper [email protected]
v1.4.0
Important
In the interceptors, the ctx.options.headers is now always normalized to Headers.
This is not a breaking change as ofetch >=1.4 will narrow 3 possibilities of HeadersInit to be always normalized Headers.
If you were previously not handling the Headers case and implicitly depending on input, you need to update the logic.
🚀 Enhancements
- Support
retryDelaywith callback function (#372) - Add better message and code for timeout error (#351)
- Allow custom global options for
$fetch.create(#401) - Support interceptors arrays (#353)
- Always clone and normalize
options.headersandoptions.query(#436)
🩹 Fixes
- Export types from
nodeexport condition (#407) - Use the wrapper to allow patching global
fetch(#377)
📖 Documentation
- Add docs for using undici dispatcher (#389)
🌊 Types
- Add
agentanddispatcheroptions (node-specific) (#308)
✅ Tests
- Add additional tests for hook errors (7ff4d11)
❤️ Contributors
- Pooya Parsa (@pi0)
- Antoine Rey [email protected]
- Cafu Chino [email protected]
- Marco Solazzi [email protected]
- @beer (@iiio2)
- Daniel Roe (@danielroe)
- Arlo [email protected]
- Alexander Topalo [email protected]
- Sam Blowes [email protected]
- Kongmoumou (@kongmoumou)
v1.3.4
🩹 Fixes
- Clear abort timeout after response was received (#369)
Types
💅 Refactors
- Remove extra line (#374)
📖 Documentation
- Add initial examples (#288)
📦 Build
- Add top-level
react-nativefield (03680dd)
❤️ Contributors
- Pooya Parsa (@pi0)
- Alex Liu (@Mini-ghost)
- Danila Rodichkin (@daniluk4000)
- Maxime Pauvert (@maximepvrt)
- Estéban (@Barbapapazes)
- Saman [email protected]
v1.3.3
🩹 Fixes
- Augment
FetchErrortype to includeIFetchError(#279)
❤️ Contributors
- Johann Schopplich (@johannschopplich)
v1.3.2
v1.3.1
v1.3.0
🚀 Enhancements
- Support customizable
retryStatusCodes(#109) - Add
optionsfield and improve the formatting of errors (#270) - Automatically enable duplex to stream request body (#275)
🩹 Fixes
- Avoid binding
.nativeto$fetch(#272) - Skip reading the body with
204responses andHEADrequests (#171, #84) - Improve response body check for node 16 compatibility (64d3aed)
- Avoid serializing buffer body (#273)
- Move body handling out of request block (15a28fb)
💅 Refactors
- Remove unused
response?: booleanoption (#223) - Pass all fetch context to the error (b70e6b0)
- error: Factory pattern for getters (6139785)
📖 Documentation
- Improve explanation about
bodyoption (#276)
❤️ Contributors
- Pooya Parsa (@pi0)
- Nozomu Ikuta
- Daniil Bezuglov
v1.2.1
v1.2.0
🚀 Enhancements
🩹 Fixes
- Always uppercase
methodoption (#259) - pkg: Fix ts type resolution for
/nodesubpath (#256) - Make all
createFetchoptions optional (#266)
📖 Documentation
❤️ Contributors
- Daniil Bezuglov
- Pooya Parsa (@pi0)
- Sébastien Chopin (@Atinux)
- Tmk (@tmkx)
- Murisceman [email protected]
- Heb (@Hebilicious)