monart_http 0.1.0 copy "monart_http: ^0.1.0" to clipboard
monart_http: ^0.1.0 copied to clipboard

HTTP client foundation for Dart built on monart. Create typed HTTP service objects using Railway-Oriented Programming with semantic outcomes per status code.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 - 2026-04-17 #

Added #

  • HttpClientConfiguration — shared configuration per HTTP client: base URI, default headers, connect/receive timeouts, and log strategy.

  • LogStrategy enum — none (default) or stdout (logs to Flutter DevTools).

  • HttpMethod enum — get, post, put, patch, delete.

  • HttpResponse — thin wrapper around the raw Dio response exposing statusCode, statusMessage, body, and headers.

  • HttpServiceBase<Value> — abstract base class for typed HTTP service objects. Subclass and declare method, pathTemplate, configuration, and fromResponse. Optional overrides: pathParams, headers, queryParams, body. Calling runAsync() dispatches the request and returns Future<Result<Value>>.

  • ResponseProcessor — maps HTTP status codes to semantic outcome names (e.g. 404['notFound', 'clientError'], 422['unprocessableContent', 'clientError']). Unrecognised codes fall back to family-level outcomes based on their range.

  • ExceptionProcessor — maps Dio and network exceptions to outcome names: timeout, sslError, connectionError, requestCancelled, uncaughtError.

  • HttpLogInterceptor — logs // entries with method, URI, status, elapsed time, and request/response bodies to the Dart developer console (Flutter DevTools Logging tab). Activated via LogStrategy.stdout.

0
likes
0
points
204
downloads

Publisher

unverified uploader

Weekly Downloads

HTTP client foundation for Dart built on monart. Create typed HTTP service objects using Railway-Oriented Programming with semantic outcomes per status code.

Repository (GitHub)
View/report issues

Topics

#http #networking #railway-oriented-programming #service-objects

License

unknown (license)

Dependencies

dio, http_status, meta, monart

More

Packages that depend on monart_http