kwhitley / itty-fetcher

An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!
MIT License
99 stars 4 forks source link

Add safe checking of payload data type to prevent undefined errors #23

Closed danawoodman closed 2 years ago

danawoodman commented 2 years ago

This fixed issues where Blob/FormData are being reported as undefined. It also makes our auto content-type/JSON.stringify code work more reliably.

Also added checking for Uint8Array. May eventually need to support more content types.

Thanks to @Crisfole for the tip on using typeof FormData !== "undefined"!

Closes #16 Closes #21

kwhitley commented 2 years ago

…fined issues

Thanks to @Crisfole for the tip on using typeof FormData !== "undefined"!

Solid!!

kwhitley commented 2 years ago

This a WIP still? See it's back in draft mode...

kwhitley commented 2 years ago

Either way, killer job you two!

danawoodman commented 2 years ago

@kwhitley sorry yeah I think it's ready for review. Def need to improve the type checking to be more robust tho

kwhitley commented 2 years ago

Ok, live in 0.7.1, let's cross our fingers! Thanks (yet again) Dana!!