Skip to content

Releases: kwhitley/itty-fetcher

v0.9.0

04 Sep 00:22
Compare
Choose a tag to compare

v0.9.x - Changelog

  • addresses discord link in README #37
  • allows for async transformRequest #36
  • creates more elaborate/useful errors #39
    • JSON response bodies in error responses are assigned into the error itself, allowing downstream deconstruction
    • if a text response body, error.message will take on that text, otherwise it will remain as response.statusText
  • several minification passes to help offset the size increase
  • fixed/simplified logic for what content is automatically stringified
    • no longer stringifies text content (test updated to match) - text should not be turned into JSON
    • stringifies: numbers, arrays, or natural Objects (base constructor === Object)
  • fixes bug when using GET requests with query in both url AND payload:
    fetcher().get('https://somewhere.com?foo=12', { foo: 10, bar: 'baz' })
    // should return https://somewhere.com?foo=12&foo=10&bar=baz

TOTAL SIZE INCREASE

~4 bytes post-minification