• dbx12@programming.dev
    cake
    link
    fedilink
    arrow-up
    6
    ·
    3 months 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
      link
      fedilink
      arrow-up
      5
      ·
      3 months 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.

  • Sv443@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    3 months 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.