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

chore(benchmark): replace request with axios #4628

Merged
merged 2 commits into from
Feb 12, 2020

Conversation

raymondfeng
Copy link
Contributor

Replacing request with axios

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

Copy link
Contributor

@emonddr emonddr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like axios, nice!

@raymondfeng raymondfeng merged commit 8c63dcd into master Feb 12, 2020
@raymondfeng raymondfeng deleted the replace-request-package branch February 12, 2020 15:32
@bajtos
Copy link
Member

bajtos commented Feb 13, 2020

In #2672, I raised the following concern:

Many request alternatives are replacing errors reported by Node.js core with its own error classes, which makes troubleshooting extremely difficult.

That was in May 2019. What's the current status of Axios implementation, does it preserve low-level error details?

Ideally, I'd like us to use the same library across the entire loopback-next codebase, including connectors like REST and SOAP.

@raymondfeng
Copy link
Contributor Author

Many request alternatives are replacing errors reported by Node.js core with its own error classes, which makes troubleshooting extremely difficult.
That was in May 2019. What's the current status of Axios implementation, does it preserve low-level error details?

I found a way to allow lower-level errors to be reported by providing a validateStatus function in the config. But this feature is not needed for benchmark testing.

Ideally, I'd like us to use the same library across the entire loopback-next codebase, including connectors like REST and SOAP.

Since this PR focuses on benchmark testing which is an internal module. I think axios does it job perfectly here. For connecting to other http services, I agree we can have a common http-client package.

@raymondfeng
Copy link
Contributor Author

See #4637 as a follow-up PR.

@bajtos bajtos linked an issue Feb 18, 2020 that may be closed by this pull request
1 task
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

Successfully merging this pull request may close these issues.

Replace "request" with something else
3 participants