-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(http-caching-proxy): replace request package with axios #4637
Conversation
f7d73b1
to
ecf41a7
Compare
ecf41a7
to
59de4bb
Compare
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
'http://www.mocky.io/v2/5dade5e72d0000a542e4bd9c?mocky-delay=1000ms', | ||
proxy: proxy.url, | ||
resolveWithFullResponse: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolveWithFullResponse
is request's counter-part of Axios' validateStatus
. Have you considered configuring validateStatus
on a per-test basis, as we are doing with resolveWithFullResponse
now?
Based on the investigation I did today, I am happy to choose Axios as our replacement for request 🎉 Let's improve implementation details now. Also, I am not confident that the switch from request to axios is fully backwards compatible in all edge cases, let's make this a semver-major change please. |
FYI: I opened a feature request in Axios to make their API closer to |
59de4bb
to
a6bd41b
Compare
a6bd41b
to
6a5d9c2
Compare
@bajtos PTAL. |
6a5d9c2
to
17e5bd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with few tiny comments to consider.
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts
Outdated
Show resolved
Hide resolved
@raymondfeng As I commented elsewhere of before, I'd like us to release this change as a semver-major release. |
17e5bd0
to
8860fbb
Compare
… client BREAKING CHANGE: [axios](https://github.com/axios/) is now used as the http client package to replace [request](https://github.com/request/request) which is now deprecated.
8860fbb
to
f3e55fa
Compare
This is part 2 to fix #2672
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈