network_caller_core 1.0.1
network_caller_core: ^1.0.1 copied to clipboard
Core interfaces, models, and typed exceptions for the network_caller federation. Pure Dart, zero dependencies.
1.0.1 #
- Widened dependency constraints to support latest versions
1.0.0 #
- Initial release
NetworkInterfaceabstract contract for GET, POST, PUT, PATCH, DELETE, upload, disposeNetworkConfigwith 18+ configurable options and smart defaultsNetworkResponse<T>generic response wrapper withresponseHeadersand typedexceptionErrorResponsemodel withcopyWithsupport- 10 typed exceptions:
NetworkTimeoutException,NoConnectionException,UnauthorizedException,ClientException,ServerException,RateLimitException,ParseException,RequestCancelledException,SslException - 4 auth strategies:
BearerAuthStrategy,ApiKeyAuthStrategy,BasicAuthStrategy,CustomAuthStrategy RetryPolicywith exponential backoff,Retry-Afterheader parsing, and configurable predicatesTokenStorageinterface withInMemoryTokenStoragefor testingTokenManagerinstance-based token management with header buildingNetworkLoggerinterface withConsoleNetworkLoggerdefault implementationNetworkMiddlewarerequest/response/error hooksCancelTokenabstract interfaceResponseParsershared parsing logic with unwrapper, message extractor, and error parser supportNetworkMultipartFileplatform-agnostic file representation (nodart:io)RequestMethodandResponseTypeenums- Pure Dart — zero dependencies, supports all platforms