http_base_client 1.2.3 copy "http_base_client: ^1.2.3" to clipboard
http_base_client: ^1.2.3 copied to clipboard

A minimalistic http client wrapped around the dart HTTP package.

1.2.3 #

  • FEAT: added proper Web compatibility support using conditional exports for platform-specific internet connectivity checks.
  • REFACTOR: removed the direct dart:io dependency from the main library entrypoint.
  • REFACTOR: extracted internet connectivity logic into dedicated platform-specific implementations (IO and Web).
  • REFACTOR: removed the Flutter SDK dependency, making the package a pure Dart package.
  • REFACTOR: replaced Flutter-specific imports with Dart core library imports where applicable.
  • REFACTOR: improved package portability and platform compatibility.
  • REFACTOR: updated the example application to a pure Dart console example.
  • CHORE: general internal cleanup and architecture improvements.

1.2.2 #

  • FEAT: introduced the HttpBaseClient interface contract, enabling easy mocking and dependency abstraction in tests.
  • REFACTOR: converted the HTTP client implementation from static-only methods to an instance-based architecture.
  • REFACTOR: added a private internal implementation (_HttpBaseClient) while keeping a clean public factory constructor API.
  • REFACTOR: improved overall package encapsulation by hiding implementation details from consumers.
  • REFACTOR: standardized and improved inline documentation comments across the package.
  • CHORE: internal code cleanup and semantic naming improvements.

1.2.1 #

  • REFACTOR: changed the default error message from Portuguese to English ("No internet connection") for better international support.
  • REFACTOR: renamed internal JSON parsing methods to _parseResponseBody and _parseResponseBodyAsync for improved code clarity.
  • REFACTOR: updated ObjectConverter methods to return Uint8List instead of List<int> where applicable, aligning with modern Dart/Flutter data handling standards.
  • CHORE: minor code cleanup and internal variable naming improvements in _processRequest.

1.2.0 #

  • FEAT: implemented a high-performance internet connection check using Socket.connect on port 53 (Google/Cloudflare IPs), replacing the old lookup method.
  • REFACTOR: centralized request handling logic into a generic _processRequest method to ensure DRY (Don't Repeat Yourself) principles.
  • REFACTOR: improved resource management by explicitly injecting and closing http.Client instances for every request, preventing potential memory leaks.
  • PERF: optimized network failure detection with a 2-second socket timeout, providing faster feedback in offline scenarios.
  • PLATFORM: added a web compatibility guard (kIsWeb). Note: active socket connection check is bypassed on Web platforms due to browser security restrictions.
  • Dependency update: updated http package to the latest version (1.6.0).

1.1.0 #

  • Update: breaking change! The properties of the class [HttpBaseClientResponse] now match the properties of [http.Response] class
  • Dependency update

1.0.9 #

  • Update: the field data now returns the parsed json synchronously

1.0.8 #

  • FEAT: update dependency constraints to sdk: '>=2.19.1 <4.0.0' flutter: '>=3.7.0'
  • FEAT: update libraries to be compatible with Flutter 3.10.0
  • Dependency update

1.0.7 #

The InternetAddress.lookup now works on Web

1.0.6 #

Including a getter "data" to return the parsed JSON

1.0.5 #

Including a few Object Converter/Parser methods

1
likes
0
points
535
downloads

Publisher

unverified uploader

Weekly Downloads

A minimalistic http client wrapped around the dart HTTP package.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on http_base_client