DorarHttpClient class

HTTP client wrapper for making requests to Dorar.net API.

Features automatic timeout handling, retry logic with exponential backoff, and typed error handling.

Constructors

DorarHttpClient({Client? client, Duration timeout = const Duration(seconds: 15), int maxRetries = 3, Duration retryDelay = const Duration(seconds: 1), bool enableLogging = false})
Create a new HTTP client

Properties

enableLogging bool
Whether to enable debug logging
final
hashCode int
The hash code for this object.
no setterinherited
maxRetries int
Maximum number of retry attempts
final
retryDelay Duration
Base delay between retries (exponential backoff)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
Default timeout for requests (15 seconds, matching Node.js API)
final

Methods

dispose() → void
Close the HTTP client and free resources
get(String url, {Map<String, String>? headers, Duration? customTimeout}) Future<String>
Make a GET request
getHtml(String url, {Map<String, String>? headers, Duration? customTimeout}) Future<String>
Make a GET request expecting HTML response
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited