28
axiosCompromised (lemmy.world)

top 5 comments
sorted by: hot top controversial new old
[-] dbx12@programming.dev 7 points 1 month ago

I'm not ja JS or TS developer, but I've never saw the appeal axios has over the standard fetch.

[-] Sv443@sh.itjust.works 6 points 1 month ago

If you just use it as a substitute for fetch, then yeah, there's no point.
Axios has some extra error handling stuff, automatically parses JSON, has interceptor hooks to create "request loadouts", throws on 4xx and 5xx errors, has a builtin way of timing out requests, and can even do some nonstandard stuff like sending a body on GET requests.

[-] Subscript5676@piefed.ca 4 points 1 month ago

Axios existed before fetch (and iirc fetch was designed with axios in mind) and comes with bells and whistles that you'd want to have when building against JSON-based API servers. It's popular for a good reason, which tbf is a rare rnough phenomenon these days in general.

[-] Sv443@sh.itjust.works 5 points 1 month ago

I get a notification like that probably twice a day and 99 times out of 100 it's a vuln that only exists if you pass unsanitized input to the library.

[-] webkitten@piefed.social 2 points 1 month ago

Me happily using Guzzle.

this post was submitted on 31 Mar 2026
28 points (83.3% liked)

Programmer Humor

31215 readers
658 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS