Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ky vs Got (in 2023) #489

Open
adamreisnz opened this issue Feb 9, 2023 · 3 comments
Open

Ky vs Got (in 2023) #489

adamreisnz opened this issue Feb 9, 2023 · 3 comments

Comments

@adamreisnz
Copy link

Hello, the readme of this repo points to a tweet from 2019 where Got is recommended for NodeJS, and Ky for the browser.
Is this answer still valid in 2023, given that Node 18 now supports native fetch?

For a new project, should we use Got or Fetch in the Node environment, if there is no requirement for code sharing between server and client?

What are the latest recommendations?

@sindresorhus
Copy link
Owner

Use Ky if it provides enough capabilities for your needs. Got excels at advanced use-cases. See out comparison table: https://github.com/sindresorhus/got#comparison

@osrl
Copy link

osrl commented Feb 9, 2023

does ky have any advantage over got?

@sindresorhus
Copy link
Owner

does ky have any advantage over got?

  • Less code (meaning less chance of bugs)
  • Just a thin wrapper over Fetch (which has more maintainers than Got)
  • If you later need it to also work in the browser, it requires no changes.
  • Works in Deno too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants