Skip to content

[DEPENDENCIES] Upgrade axios to >=1.7.0 to enable native fetch adapter support #67

@jcmunoz200

Description

@jcmunoz200

Reason for the upgrade

Axios v1.7.0 (stable released May 2024; the feature was already available in the v1.7.0-beta.0 you linked) officially introduces a new built-in fetch adapter based on the native Fetch API.

Official release: https://github.com/axios/axios/releases/tag/v1.7.0
Main PR that added the fetch adapter: axios/axios#6371

Key benefits of the new fetch adapter

  • Uses the modern Fetch API → better performance and significantly smaller bundle size (no longer depends on XMLHttpRequest).
  • Native support for response streaming (responseType: 'stream') and FormData.
  • Upload/download progress events work the same as with the XHR adapter.
  • Allows injection of a custom fetch implementation (extremely useful in Edge runtimes like Vercel Edge Functions, Cloudflare Workers, Next.js middleware, SvelteKit server endpoints, etc.).
  • Axios automatically selects the fetch adapter when XMLHttpRequest or Node’s http module are unavailable, or it can be forced explicitly:
axios.get(url, {
  adapter: 'fetch'  // or a custom fetch implementation
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions