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

1450 refactor http client #1461

Closed
wants to merge 14 commits into from
Closed

Conversation

lucanicoladebiasi
Copy link
Collaborator

Description

Classes at packages/network/src/http define HTTP client functionalities and provide an HTTP client based on Fetch API.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change required a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • yarn test:solo

Test Configuration:

  • Node.js Version: v22.8.0
  • Yarn Version: 1.22.22

Copy link

github-actions bot commented Oct 31, 2024

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 99%
99.06% (4358/4399) 97.71% (1411/1444) 99.11% (898/906)
Title Tests Skipped Failures Errors Time
core 808 0 💤 0 ❌ 0 🔥 2m 6s ⏱️
network 731 0 💤 0 ❌ 0 🔥 4m 38s ⏱️
errors 42 0 💤 0 ❌ 0 🔥 15.089s ⏱️
logging 3 0 💤 0 ❌ 0 🔥 15.271s ⏱️
hardhat-plugin 19 0 💤 0 ❌ 0 🔥 53.409s ⏱️
aws-kms-adapter 23 0 💤 0 ❌ 0 🔥 1m 11s ⏱️
ethers-adapter 5 0 💤 0 ❌ 0 🔥 1m 4s ⏱️
rpc-proxy 37 0 💤 0 ❌ 0 🔥 59.421s ⏱️

@lucanicoladebiasi
Copy link
Collaborator Author

lucanicoladebiasi commented Nov 1, 2024

I named the interface defining HTTP client as HttpClient from HttpClient because everything else Http* is an interface and everything referring the HTTP client is a reference to that interface.
I named the class implementing HttpClient using Fetch API as FetchHttpClient because we could have other implementation based on different libraries.
I wonder if it is clearer if I name Fetch API implementation as DefaultHttpClient.

@fabiorigam
Copy link
Member

Already implemented

@fabiorigam fabiorigam closed this Nov 11, 2024
@fabiorigam fabiorigam deleted the 1450-refactor-http-client branch November 11, 2024 14:51
@victhorbi victhorbi removed this from the 2.0.0 milestone Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants