Skip to content

chore(benchmark): replace request with axios#4628

Merged
raymondfeng merged 2 commits into
masterfrom
replace-request-package
Feb 12, 2020
Merged

chore(benchmark): replace request with axios#4628
raymondfeng merged 2 commits into
masterfrom
replace-request-package

Conversation

@raymondfeng

Copy link
Copy Markdown
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 👈

@emonddr emonddr left a comment

Copy link
Copy Markdown
Contributor

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

bajtos commented Feb 13, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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