hyperjumptech/monika

Spike using fetch

sapiderman opened this issue · 2 comments

Spike using fetch vs Axios

  1. Fetch has native support
  2. Already stable in Node v21

Target

  1. Is it possible to use native Fetch and replace Axios
  2. How much work would it be
  3. Will node v21 breaking?

TODO

References

  1. https://blog.logrocket.com/fetch-api-node-js/
  2. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Basic_concepts

Edit :

  • 2024 Feb 16 : Added TODO
  • 2024 Feb 23 : Added TODO item #1247
  • 2024 Feb 23 : Added TODO item "Remove experimental toggle"
  • 2024 Feb 28 : Added TODO Handle error
  • 2024 Mar 08 : Added TODO Remove Axios
  • 2024 Apr 04 : Added TODO Handle HTTP 3xx

@nrsysdev should we split the issue? 1 for fetch, 1 for node v21/22?

@nrsysdev should we split the issue? 1 for fetch, 1 for node v21/22?

not necessarily needed. We can use node-fetch as it is compatible with fetch web API. Since Monika is using Node v18 (latest LTS). We can use this package until a new NodeJS LTS version has stable fetch API.