mrkeyoor.comAsk

axios/axiostested 24 Oct 2026commit aa54a5e

axios review

Our Axios source build succeeded in 9 seconds, but its test command failed with 17 failures and 1,683 passes in our October sandbox.

  • README install 2.1 s
  • 4.4 MB on disk
1,683/1,700passed, run exited non-zero
  • 26 dependencies
  • Install 11 s
Webevaluationupdated 18 Nov 2026
+138stars / 7d

Axios is an open-source JavaScript HTTP client for browsers and Node.js. It sends API requests and lets applications share configuration, transform data, and intercept requests or responses before individual callers handle them.

Verdict

Our Axios source build succeeded in 9 seconds, but its test command failed with 17 failures and 1,683 passes in our October sandbox. Use it if shared request configuration, interceptors, or form serialization solve repeated work in your application. Skip it if native Fetch already meets those needs, or if your requirement is a server-data cache. Anyone whose environment installed the March compromised versions should follow the postmortem’s credential and CI investigation guidance.

axios infographic: send HTTP requests and handle responses, plus its uses, our test result, pitfalls and who it suits
Tested 18 November 2026: the README snippet ran as written. Before that: 24 Oct: 1,683 of 1,700 tests passed; npm install took 2.1 s.

We ran it

Lab card: what happened when we ran axios
Lab card from our sandbox run
Screenshot of axios (axios-http.com)
axios-http.com
Install✓ · 11s630 packages · 202 MB
Build✓ · 9s
Tests✗ · 150s1683 passed · 17 failed of 1700 (vitest)
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo506 files~49,430 lines of source · 4.6 MB · 8 CI workflows · tests dir

Answers from our run

Does axios build from source?

Dependencies installed in 11 seconds (630 packages), and the build succeeded in 9 seconds. We cloned commit aa54a5e into a clean Debian container with 3 CPUs and no project-specific setup.

Do axios's tests pass?

No. The project's own test command finished in 150 seconds and reported 1683 passed, 17 failed (vitest).

Does axios have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use axios?

Applications already served by native Fetch that have no concrete use for another request interface.

What are the alternatives to axios?

Native Fetch, TanStack Query, RTK Query. Our Axios source build succeeded in 9 seconds, but its test command failed with 17 failures and 1,683 passes in our October sandbox.

Setup5/5In our 2026-11-18 run it installed as the README says in 2.1 s and the README’s “Package manager” example ran unedited.Editor’s note: Installation and build succeeded in the October source harness, but the test command failed. Application setup across the supported adapters was not assessed.
Docs3/5The 3,083-character README has no install instructions or usage instructions or examples of its own and points to separate documentation, which we did not assess.Editor’s note: The README covers instances, interceptors, cancellation, and serialization. Documentation correctness across those runtime paths was not systematically assessed.
Community5/5Last push on 2026-11-18, 109,363 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: The sampled issues contain maintainer replies and user workarounds. They do not measure response times, adoption, or support capacity.
Maturity4/5Latest release v1.21.1 on 2026-11-09, repository created 2014-08-18 and its test suite did not pass in our sandbox (1,683 of 1,700 passed).Editor’s note: The source harness and dated release records inform this review, but production reliability and current cross-adapter compatibility were not assessed.

How we score

Discussed on

  1. hnPost Mortem: axios NPM supply chain compromise291 points
  2. hnAxios-Ipsos poll: Most Americans say Covid is no longer a crisis97 points
  3. hnReddit CEO: Platform doesn't plan to ban pornography81 points
  4. hnGoogle Ventures uses algorithms to approve or kill VC investments68 points
  5. hnThe childless, aging future60 points

Who it’s for

Teams with repeated request policies that benefit from shared Axios instances and interceptors.
Browser and Node.js developers who want the documented JSON and form serialization interfaces.
Maintainers evaluating the source checkout with the failed test baseline kept visible.

Who it’s NOT for

Applications already served by native Fetch that have no concrete use for another request interface.
Browser applications expecting a client library to bypass server CORS permission, the problem explained in issue #853.
Teams seeking a replacement for server-state caching: TanStack Query and RTK Query address that responsibility.
Projects requiring an entirely green reproduced source suite before adoption: our October command reported 17 failures.

Setup reality

Our October 24, 2026 source run at aa54a5e installed successfully in 11 seconds, recording 630 dependencies and 202 MB on disk. The build succeeded in 9 seconds. Tests exited 1 after 150 seconds: 1,683 passed and 17 failed out of 1,700, with repeated 5,000 ms timeouts and one additional error reported. npm audit recorded 0 known vulnerabilities. The configuration specified 3 CPUs, 8 GB RAM, and lab-node:22.

The README documents npm install axios and import or require for application use. Axios is a client library, so credentials and services depend on the API you call. Shared headers, request interceptors, serialization, and timeout settings belong to that application configuration. The 202 MB source environment is not a browser-bundle measurement.

Browser CORS permission comes from server responses. React Native issue #5366 contains individual fixes involving certificates and upload MIME types. The timeout tail gives no diagnosis for our failed suite. Actual runtime and operating-system versions require raw toolchain logs, not the image label. A separate November quickstart loaded its package-manager snippet successfully with no output.

Axios is an open-source HTTP client for browsers and Node.js, and our source checkout built successfully before its test command failed. Use it if shared configuration and request interceptors would remove repeated HTTP handling from your application. Skip it if Fetch already covers your requests, or if you expect changing clients to repair a server's CORS policy. This review covers the JavaScript project axios/axios on GitHub, a separate product from Axios news.

What people use axios for

Developers use Axios to retrieve API data, submit forms, and upload files, but the issue records show that a request can fail outside the client library. These examples describe named attempts and outcomes rather than a list of possible features:

Who used it What they attempted What happened
The author of issue #853 Retrieve 4chan board threads in a browser cURL worked, but the browser blocked access because the response lacked CORS permission. A commenter explained the server-side requirement.
The author and commenters in issue #960 Read server validation errors after submitting a form A commenter recommended inspecting error.response. Other participants still reported missing responses.
asapMaki in issue #5366 Call an HTTPS API from React Native on Android Downgrading failed to help. The commenter reported success after the API's SSL handshake problem was resolved.
bananemo in issue #5366 Upload FormData from Expo React Native on Android Fetch failed too. Adding the file value's MIME type made the upload work for this user.
Maintainer nickuraltsev in issue #318 Send fields and a CSV Blob as FormData The maintainer successfully sent the data to the server and could not reproduce the original failure.

The unnamed instructor in the pack's Axios CRUD tutorial demonstrates a GET request against a fake-data service and reports receiving a response. That is a useful illustration of the request-and-response workflow. The browser result gives a beginner something concrete to inspect: returned data and response metadata. It belongs alongside the issue reports as learning evidence, without turning a tutorial into a claim about company deployments.

What happened when we ran it

Our November 18 quickstart record shows a package-manager JavaScript snippet exiting successfully with no output; our October 24 source run completed installation and build, then failed its test command. The two records exercise different things and should inform different decisions.

The quickstart run used checkout 9f0f4ddfe72b in an unprivileged lab-node:22 container configured with 2 CPUs and 4 GB RAM, without published ports or secrets. It installed the npm package and ran the README's package-manager JavaScript block unedited. The snippet record reports exit 0 and no output, and the teardown record says cleanup succeeded. The task was package loading. It never asked an API a known-answer question.

For the source harness, we cloned commit aa54a5e on October 24, 2026. Its recorded configuration was 3 CPUs, 8 GB RAM, and image lab-node:22. The checkout contained 506 files, about 49,430 source lines, and occupied 4.6 MB before the dependency installation. Our source-harness record reports:

Step or observation Recorded result What it means for the reader
Dependency installation Succeeded in 11 seconds, 630 dependencies recorded, 202 MB on disk Working on the source checkout involves its development environment.
Build Succeeded in 9 seconds This commit produced a successful source build in our sandbox.
Tests Exit 1 after 150 seconds, 1,683 passed and 17 failed out of 1,700 The test command failed despite most reported cases passing.
Failure tail Repeated “Test timed out in 5000ms” messages, 2 failed files, 72 passed files, 1 error The visible failure evidence is timeouts and an additional error count.
npm audit 0 known vulnerabilities across the recorded severity categories This is a dated audit result for this environment.
Repository signals 8 CI workflow files, a tests directory, no Dockerfile The checkout includes automated-check infrastructure.

The build was the easy part: it finished in 9 seconds. The tests then occupied 150 seconds and returned a failure. A contributor deciding whether to change an adapter should take that red result seriously and retain the complete output before comparing a changed checkout with this baseline. The supplied tail names timeout messages, not their cause. Calling these failures an Axios defect or blaming a missing browser would go beyond this run's evidence.

The 202 MB figure describes the recorded source environment. It should not become a claim that every application importing Axios ships that much code. The package-loading exercise and the source harness also serve different purposes: one checks a small entry point, while the other attempts the repository's checks. Neither result overrides the other.

Where people get stuck: CORS, missing responses, and uploads

Browser CORS permission must come from the server response, so adding Access-Control-Allow-Origin to an Axios request cannot grant that permission. In issue #853, sunnykgupta explains why cURL succeeds while the browser refuses access. The proposed workaround is an appropriate server-side proxy. The author's subsequent proxy attempt still failed in the captured discussion, so the thread supplies a diagnosis rather than a completed fix for that application.

The useful troubleshooting order follows the evidence available to you:

Symptom Evidence to inspect What the captured thread actually resolved
Browser blocks a request that works in cURL Response CORS headers and the browser's warning #853 explains browser enforcement and proposes a proxy.
Android reports Network Error while iOS works TLS handshake and the exact upload value #5366 contains separate user resolutions for certificates and a missing MIME type.
A form submission rejects with validation errors The response attached to the caught error #960 recommends error.response when present, with unresolved cases also reported.
URL-encoded data or its Content-Type disappears Serialized body and interceptor output In #362, hyanmandian reports success using an interceptor with qs.
Multipart data fails to parse Actual content-type values and FormData body In #318, nickuraltsev says #317 fixed duplicated content-type values.

Read the two Android stories separately. asapMaki tried an older Axios version and still got the error, then traced the failure to the API's SSL certificates. bananemo also tried Fetch, still failed, and fixed the FormData file value by adding its MIME type. Their successful outcomes argue for checking the handshake and payload before replacing every request call. They do not make either workaround a universal treatment for Android Network Error.

The history of issue #362 is similarly uneven. Its author had a working jQuery request, while Axios requests lost the expected header. Commenters proposed different serialization workarounds and disputed whether earlier suggestions fixed their cases. For an existing interceptor chain, inspect what it returns and what reaches the network. A closed discussion with contradictory outcomes is a poor substitute for checking the body your server receives.

Shared configuration is the reason to choose Axios

Axios instances and interceptors let a team share request configuration and change requests or responses before application code handles them. The README's interceptor examples show handlers returning configuration, responses, or rejected promises, and show how to eject a handler. That is useful when several API calls must follow the same policy. It also means that one interceptor can influence many otherwise unrelated calls.

I would keep an API client's configuration close to the code that owns that API. Review changes to serialization and error handling as changes to all callers of that instance. Issue #362 gives this advice a concrete reason: a header visible inside an interceptor was not necessarily the header participants saw at the server. The return value and resulting request matter more than a reassuring console message halfway through the chain.

For cancellation, the README documents AbortController and marks CancelToken as deprecated. Prefer the documented controller path for new code. Cancellation belongs in the same design discussion as timeouts and error handling: a user leaving a screen, a server rejecting a request, and a request waiting indefinitely need different application responses.

Security: the March compromise requires installation-history checks

Jason Saayman's postmortem says malicious Axios versions 1.14.1 and 0.30.4 were published on March 31, 2026, through his compromised npm account. The postmortem in issue #10636 says they introduced plain-crypto-js@4.2.1, which installed a remote access trojan, and remained available for about three hours before removal. Its captured status reads “Remediation in progress.”

For an affected installation, the postmortem calls for credential rotation and network-log checks, including secrets injected into CI builds. It also lists removal of the malicious dependency and historical fallback versions. Treat that version advice as incident-specific guidance from March. It is not a reason to select an old version for a new application in November.

A commenter in issue #10604 warns that the payload self-deletes and replaces files, making lockfile differences and outbound network logs more useful than inspecting the installed directory alone. Another commenter in #10636 warns about npx dependency resolution without a project lockfile trace and recommends checking CI network logs. Those are attributed triage observations, not findings from our sandbox.

Our October audit's zero-advisory result answers a narrower question than “was this machine ever affected?” A later clean dependency tree cannot answer which package ran during an earlier installation. If your team installed an affected version, follow incident-response evidence rather than treating today's package contents as a history of the machine.

Timeouts and adapter limits need explicit choices

The Axios README tells production users to set a timeout because a stalled request can otherwise hang indefinitely. Its request configuration also documents body and response-size limits with adapter-specific enforcement. Read those scopes before applying a shared configuration to browser, Fetch, and Node HTTP paths. A setting that exists in the API is only useful if the transport you use enforces it.

For a service issuing many requests, my recommendation is to decide the timeout and acceptable payload size before rolling the client out across the application. Include the server's expected error response in that decision. Issue #960 shows why: a validation response and a failure before any response exists require different branches. Keep response handling explicit so an HTTP rejection can still produce a useful message without assuming every caught error has a server body.

Axios vs Fetch, TanStack Query, and RTK Query

Axios vs Fetch is a choice about request handling; TanStack Query and RTK Query also manage fetched data and caching. My starting choice for straightforward requests would be native Fetch. I would add Axios when shared configuration, transformations, or interceptors eliminate actual repeated work in the application. That recommendation follows the documented interfaces, rather than a speed ranking.

Alternative What the evidence shows When I would choose it
Native Fetch MDN shows explicit status checks and JSON parsing. In #5366, switching to Fetch left individual Android failures unresolved. Existing Fetch calls already cover the application's request policies.
XMLHttpRequest The author of #318 had a working upload and asked for its Axios equivalent. Preserve a functioning legacy upload while isolating the migration failure.
jQuery AJAX The author of #362 reported that the jQuery version worked. Keep the known request as a reference while comparing headers and serialized data.
TanStack Query, formerly React Query Its overview describes fetching, caching, synchronizing, and updating server state. The React problem is stale or shared server data across components.
RTK Query Its overview describes data fetching and caching within Redux Toolkit. The application wants that data layer integrated with Redux Toolkit.

For Axios vs Fetch in React, identify the work first. Axios gives you a request API and shared request policies. A query library addresses the lifecycle of data used by your interface. Replacing Axios with a cache library is therefore not a direct substitution of every responsibility. You can choose a data-management approach and then decide what makes its network requests.

Fetch also requires care around failures. MDN explains that a server's 404 response fulfills the Fetch promise, so callers check the status themselves. That difference can affect an application's error branch when migrating from Axios. Compare behavior, not the number of characters in a tutorial's successful GET request.

What the other reviews get wrong

Should I Use It's “Axios Review 2026” explicitly reviews the news publisher and tells npm-library readers they are looking at a different product. Its Axios page is correctly separating entities. The mistake would be borrowing its news verdict or ratings to judge this HTTP client. Likewise, “Is Axios Reliable? A Detailed Review” opens by identifying a news platform, so its reliability discussion cannot settle a library decision.

There is a more consequential omission in Should I Use It's library warning: “patch or pin immediately” is shorter than the postmortem's response for an affected installation. A developer whose machine executed the malicious package also needs the credential and CI investigation described above. Updating a dependency is useful maintenance, but it does not account for secrets that may already have been exposed.

The supplied Reddit and X records also concern the news publisher. They contribute no relevant testimony about library use. The Axios documentation site's sponsor logos identify sponsors, not demonstrated production deployments. Neither a shared name nor a logo is a sound basis for choosing this request client.

Questions people ask

Axios is a promise-based HTTP client: JavaScript code sends a request and handles the eventual response or error through a promise. The README documents browser and Node.js use, along with the methods and configuration below.

What is Axios, and what does a promise-based HTTP client do?

Axios sends HTTP requests and exposes asynchronous results through promises. “Axios” here means the axios npm package maintained in axios/axios on GitHub. Axios news is a separate publication, as the Should I Use It page itself explains. For the meaning of the software name, the useful definition is HTTP client. The captured documentation supplies no pronunciation guide, so this review does not prescribe one.

How do I use Axios to fetch data in React?

Call axios.get with an endpoint, await its promise, and read response.data, following the README's GET and response-schema examples. For “axios in React” or “axios in React JS,” the HTTP call is the same library operation. Choose separately how the component handles loading, cancellation, and cached data. A request method alone does not provide the server-state lifecycle described by TanStack Query.

Is Axios or Fetch better for my React application?

Choose Axios when its shared configuration or interceptors solve repeated request work. Choose Fetch when the existing platform API meets the need. MDN's Fetch example checks response.ok and parses the JSON body explicitly. Compare that handling with the Axios interface your team wants to maintain. The Android reports in #5366 also show that changing clients can leave the original failure intact.

How does Axios compare with TanStack Query, React Query, and RTK Query?

TanStack Query, formerly React Query, handles fetching and managing server state, according to its overview. RTK Query handles data fetching and caching as part of Redux Toolkit. Axios handles HTTP requests. Start with the missing responsibility: request policies, or data that must stay synchronized across the interface. That gives a more useful answer than treating all of these packages as interchangeable clients.

How does Axios relate to REST APIs and AJAX?

Axios is a client you can use to call REST endpoints, rather than an API service you deploy. AJAX describes asynchronous web requests, including the browser request style illustrated by the Axios README. The library's browser and Node.js request support explains why a REST backend and an Axios frontend can be parts of the same application. They are different jobs in the request's path.

How do I install and start using Axios?

The README documents npm install axios, followed by import or require. Our source-checkout installation numbers belong to the harness above. For the Axios latest version question, GitHub's latest-release endpoint returned v1.21.1, published November 9, 2026, during our November 18 check. Record your resolved version rather than assuming a tutorial's package version matches the one in your lockfile.

How do I make GET, POST, PUT, and DELETE requests with Axios?

Use axios.get(url, config), axios.post(url, data, config), axios.put(url, data, config), and axios.delete(url, config), as documented in the method aliases. The data argument differs between these signatures. In particular, do not assume the second argument to delete has the same meaning as the second argument to post. Match the method's signature before diagnosing what reached the server.

How do I pass query parameters and preserve instance defaults?

Pass query values in the params configuration object, following the README's GET example. For shared defaults, include a regression check that asserts the actual outgoing parameters. Issue #2190 reports a historical failure to combine request parameters with instance defaults. Commenters used a downgrade as a workaround. That old workaround is not current version-selection advice, and the captured thread does not identify the release that resolved it.

How do I add request headers and read response headers?

Set request headers in the headers configuration and read response.headers, using lowercase header names, as the README's response schema describes. Keep the direction clear: request headers travel to the server, response headers come back. The CORS discussion in #853 is the practical warning about confusing them. Setting a response-permission header on the outgoing request cannot instruct the browser to grant access.

How do I use interceptors without losing request headers or data?

Return the configuration from a request interceptor, as the README shows, and inspect the final outgoing request when changing serialization. In #362, hyanmandian reports that combining an interceptor with qs solved their URL-encoded-body problem. Other participants disputed proposed fixes. Preserve a reproducible request and compare the resulting header and body with what the server expects.

How do I send application/x-www-form-urlencoded data with Axios?

The README documents URLSearchParams and URL-encoded serialization. Choose a representation that matches the endpoint, then inspect the transmitted body. Issue #362 contains several historical workarounds, including qs serialization, with mixed outcomes. A header naming a content type and a correctly serialized body are separate things to inspect when the server receives empty or unexpected data.

How do I upload a file or send FormData with Axios?

Pass FormData as the request body, following the README's multipart instructions. In #318, nickuraltsev successfully sent fields and a CSV Blob that way. React Native upload values deserve their own check: bananemo's successful Android fix in #5366 added a MIME type to the file value. Keep the known-working payload as the reference when isolating an upload failure.

How do I cancel a request with Axios?

Pass an AbortController signal in the request configuration and call controller.abort to cancel it, as the README's cancellation section demonstrates. The same section marks CancelToken as deprecated. For new code, follow the controller example and make the application's cancellation behavior explicit, especially when leaving a screen that started a request.

What we have not tested yet

Our evidence covers a source build, a failed source test command, and a package-loading quickstart, not a production API workload. We have not tested Axios against Fetch for latency, throughput, memory, or browser-bundle size. The November pack's separate package-install footprint and timing records are not the October source-harness measurements used here. Its silent snippet provides no completed-request result or known-answer API check.

The supplied timeout tail does not establish the causes of all 17 failures or the extra error. Raw toolchain logs are needed to state actual runtime and operating-system versions. The lab-node:22 image label alone cannot supply them. The audit result is not an incident-response investigation, and we have not reproduced the historical CORS, certificate, interceptor, or multipart reports.

We have not tested current HTTP/2 behavior, proxies, every adapter, or production concurrency. The current README describes experimental HTTP/2 support in the Node HTTP adapter, which is more specific than the old closed feature-request thread. No measured winner follows from that documentation. Company adoption, maintainer response-time expectations, and a current release resolving the old parameter-merging regression are also outside this evidence. Before standardizing an instance across an application, exercise its actual endpoint with cancellation, an HTTP error, and the payload that matters to your users.

Alternatives

ProjectWhat it isPick it when
Native FetchThe platform HTTP interface, with explicit response-status handling and JSON parsing.Choose it when existing Fetch calls already meet your request needs without Axios instances or interceptors.
TanStack Query gh↗A server-state library covering fetching, caching, synchronization, and updates.Choose it when the missing piece is managing server data across a React interface. Decide separately which HTTP client makes its requests.
RTK QueryData fetching and caching included as an optional part of Redux Toolkit.Choose it when Redux Toolkit is the intended home for data fetching and caching, rather than expecting Axios alone to provide that layer.

What people are saying

  1. [github-trending] axios/axios

Sources

  1. Axios README
  2. Axios v1.21.1 release
  3. Using Fetch, MDN
  4. TanStack Query overview
  5. RTK Query overview
  6. Supply-chain compromise postmortem
  7. October 24 source harness

More web reviews