via 1.3.0
via: ^1.3.0 copied to clipboard
A modern, type-safe HTTP client library for Dart/Flutter applications.
Changelog #
All notable changes to this project will be documented in this file.
1.3.0 #
Added #
- Multipart Upload Support: Dedicated
via.multipart()method for form-data and file uploads. - WebSocket Support: Introduced
ViaSocketfor lightweight and flexible WebSocket connections. - WebSocket Pipelines: Added
ViaSocketPipelinefor intercepting lifecycle events. - WebSocket Auto-Reconnect: Support for
autoReconnectandreconnectDelay. - Smart URI Conversion: Automatic
http/httpstows/wssconversion. - Examples: Added
multipart_example.dart,socket_example.dart, andsocket_reconnect_test.dart.
Changed #
- API Simplification: Shorthand methods (
post,put,patch,delete) now only handle standard bodies. All file uploads must usevia.multipart(). - Internal Refactoring: Moved HTTP methods to
ViaMethodsmixin and organized pipelines intosrc/features/pipelines/. - Removed
part/part ofstructure in favor of standard imports.
1.2.4 #
Changed #
- Refactored HTTP methods to use the
ViaMethodenum for better type safety and consistency. - Updated
ViaRequest.toCurl()andViaRequest.toString()to correctly use enum values. - Internal cleanup of method parameter types across the library.
1.2.3 #
Changed #
- Internal cleanup: Removed redundant generic type parameters from
ViaExecutorandViaRetry. - Simplified internal execution flow by centralizing type casting in the
Viaclass. - Improved code maintainability by reducing generic boilerplate in core feature classes.
- Updated all examples to support sequential execution via
Future<void> main(). - Improved
example/main.dartto act as a comprehensive test runner for all features. - Enhanced
example/pipeline.dartwith a custom logger for better visibility.
1.2.2 #
Fixed #
- Further improved
toCurlcharacter escaping by using single quotes for headers and URL to prevent shell interpretation issues. - Fixed
toJsoninViaResultto correctly handle null-aware response properties. - Added
responseobject toViaExceptioninViaResponseValidatorPipelinefor better debugging.
1.2.1 #
Fixed #
- Fixed
toJsonandtoCurlimplementations inViaRequest. - Improved cURL command generation with better character escaping for terminal compatibility.
- Fixed
ViaExceptionJSON serialization by correcting null-aware syntax. - Adopted modern Dart null-aware map entries syntax (
?variable) for cleaner metadata.
1.2.0 #
Changed #
- Refactored
ViaPipelineto be non-generic for better flexibility and simplicity. - Removed generic requirements from all built-in pipelines (
ViaLoggerPipeline,ViaCachePipeline, etc.). - Simplified custom result transformation by removing
covariantcomplexity in favor of standard inheritance.
1.1.0 #
1.0.0 #
Added #
- Initial release of the Via HTTP engine.
Viaclass for high-level HTTP operations.ViaExecutorwith support forViaPipelinearchitecture.- Built-in resilience with
ViaRetry(automatic retries). - Request cancellation support via
CancelToken. - Type-safe JSON parsing helpers (
asMap,asList). - Memory-managed
ViaCachePipeline(FIFO withmaxEntries). - Advanced pipelines:
ViaLoggerPipeline(with cURL support),ViaDebouncePipeline,ViaThrottlePipeline, andViaResponseValidatorPipeline. - Connection pooling support with shared
http.Client. - Isolate-based execution support for background processing.
errorIfvalidation inViaExecutorto treat HTTP responses as errors (defaults to non-2xx).