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

Consideration to ditch Request dependency? #350

Open
sbr2567 opened this issue May 17, 2020 · 1 comment
Open

Consideration to ditch Request dependency? #350

sbr2567 opened this issue May 17, 2020 · 1 comment

Comments

@sbr2567
Copy link

sbr2567 commented May 17, 2020

Since Request has been deprecated for some time now, have you considered switching out the dependency for something more stable like got, node-fetch or axios? I imagine this would be a desirable move for the long run.

@mike442144
Copy link
Collaborator

The author of request said it is one of first modules uploaded in npmjs, and in the last ten years nodejs core has changed so much that it cannot keep it up to date. crawler was also published about ten years ago, as we can see the code style, new features of es6 even es7 make developers' code differ.

With so many years development, I believe request is more stable than any other 'new generation' module. We also have hundreds of crawler instances running in the production environment where stability is really counted. That's why I don't want to simply replace request with modules you mentioned. So no need to worry about the stability if it's your concern, crawler is always reliable.

If we are talking about the API or code style like promise, calling chain, or even async, await, I agree with you that we should do something to make it look like 'modern'. So the problem is whether the code style deserves the risks of instability?

My answer is no. I prefer to develop a totally new library or framework for next ten years in a modern way.

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

2 participants