Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    Alternative for request package/library

    Development
    3
    5
    127
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Miller last edited by

      Hi all,
      I was thinking of developing a new module which would require some OAuth calls to a RESTfull API.
      I see most module so far use the “request” package for this.
      Since the request package/library is deprecated, it would make no sense to start a new module with this package, only to have to update it within a few months.

      What would be the best alternative to request, to get started with a new module?

      Thx in advance.

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @Miller last edited by

        @Miller the nodejs library for request mentions an issue to find possible alternatives

        https://github.com/request/request/issues/3142

        seems Axios gets many mentions…

        just because its depricated doesn’t mean it doesn’t work… just won’t work sometime in the future…
        as mentioned in the discussion of the issue, some large company tools/products use request and won’t be changing anytime soon…

        M 1 Reply Last reply Reply Quote 0
        • M
          Miller @sdetweil last edited by

          @sdetweil Thank you for your answer.

          I’ve seen Axios gets many mentions indeed, also got seems to have something going
          https://github.com/request/request/issues/3143

          I was hoping, maybe someone else had encountered a similar dilemma already, and would gladly follow the path the majority of developers would take. Makes little sense if every new/modified module uses another package I would think.

          Maybe I will just start with request anyway (many examples) or give Axios a try.

          1 Reply Last reply Reply Quote 0
          • Sean
            Sean Module Developer last edited by Sean

            Already I’m slowly moving my modules to use Axios and http(s) instead of request. But many legacy node modules are still using request.

            M 1 Reply Last reply Reply Quote 0
            • M
              Miller @Sean last edited by

              @Sean thank you for your input

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy