Releases: unjs/ofetch
Releases · unjs/ofetch
v1.4.1
🩹 Fixes
- Remove undefined
method
andquery
/params
from fetch options for older chrome compat (#451) - Use
response._bodyInit
as 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
retryDelay
with 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.headers
andoptions.query
(#436)
🩹 Fixes
- Export types from
node
export condition (#407) - Use the wrapper to allow patching global
fetch
(#377)
📖 Documentation
- Add docs for using undici dispatcher (#389)
🌊 Types
- Add
agent
anddispatcher
options (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-native
field (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
FetchError
type to includeIFetchError
(#279)
❤️ Contributors
- Johann Schopplich (@johannschopplich)
v1.3.2
v1.3.1
v1.3.0
🚀 Enhancements
- Support customizable
retryStatusCodes
(#109) - Add
options
field and improve the formatting of errors (#270) - Automatically enable duplex to stream request body (#275)
🩹 Fixes
- Avoid binding
.native
to$fetch
(#272) - Skip reading the body with
204
responses andHEAD
requests (#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?: boolean
option (#223) - Pass all fetch context to the error (b70e6b0)
- error: Factory pattern for getters (6139785)
📖 Documentation
- Improve explanation about
body
option (#276)
❤️ Contributors
- Pooya Parsa (@pi0)
- Nozomu Ikuta
- Daniil Bezuglov
v1.2.1
v1.2.0
🚀 Enhancements
🩹 Fixes
- Always uppercase
method
option (#259) - pkg: Fix ts type resolution for
/node
subpath (#256) - Make all
createFetch
options optional (#266)
📖 Documentation
❤️ Contributors
- Daniil Bezuglov
- Pooya Parsa (@pi0)
- Sébastien Chopin (@Atinux)
- Tmk (@tmkx)
- Murisceman [email protected]
- Heb (@Hebilicious)