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

feat: switch httpclient to httpclient2 for retry feature #3626

Merged
merged 2 commits into from
Apr 16, 2019

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Apr 12, 2019

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

#3606

@atian25 atian25 requested review from fengmk2 and dead-horse April 12, 2019 11:19
@atian25 atian25 force-pushed the httpclient2-fix branch 2 times, most recently from 0a2344a to d8ea06f Compare April 12, 2019 11:42
@@ -37,12 +37,12 @@ declare module 'egg' {
// Remove specific property from the specific class
type RemoveSpecProp<T, P> = Pick<T, Exclude<keyof T, P>>;

interface EggHttpClient extends HttpClient2 {}
interface EggHttpClient extends HttpClient<RequestOptions> {}
Copy link
Member Author

Choose a reason for hiding this comment

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

@whxaxes 看看这里。

HttpClient 和 HttpClient2 的 requestThunk 返回值是不一样的。 urllib 里面的 d.ts 感觉有问题。

EggHttpClient 是在 HttpClient2 的基础上,兼容了 HttpClient 的接口,你看看这样定义会不会有问题

@atian25 atian25 force-pushed the httpclient2-fix branch 4 times, most recently from 03c19a8 to 31a2777 Compare April 16, 2019 01:42
@codecov
Copy link

codecov bot commented Apr 16, 2019

Codecov Report

Merging #3626 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3626   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          34      34           
  Lines         937     943    +6     
======================================
+ Hits          937     943    +6
Impacted Files Coverage Δ
lib/core/dnscache_httpclient.js 100% <ø> (ø) ⬆️
lib/core/httpclient.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bb7c7e...0a5ad5a. Read the comment docs.

@atian25 atian25 merged commit e7fbd68 into master Apr 16, 2019
@atian25 atian25 deleted the httpclient2-fix branch April 16, 2019 08:57
popomore pushed a commit that referenced this pull request Apr 16, 2019
feat: switch httpclient to httpclient2 for retry feature (#3626)
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.

2 participants