Response class abstract

Base class for all responses received from the Horizon server.

This abstract class provides common functionality for handling HTTP response headers, particularly rate limiting information. All specific response types extend this class.

Rate limit information is populated from HTTP headers:

  • rateLimitLimit: Total number of requests allowed per time window
  • rateLimitRemaining: Number of requests remaining in current window
  • rateLimitReset: Timestamp when the rate limit window resets

Example:

var account = await sdk.accounts.account(accountId);
print('Rate limit remaining: ${account.rateLimitRemaining}');
print('Rate limit resets at: ${account.rateLimitReset}');

See also:

Implementers

Constructors

Response()

Properties

hashCode → int
The hash code for this object.
no setterinherited
rateLimitLimit ↔ int?
Maximum number of requests allowed in the current rate limit window.
getter/setter pair
rateLimitRemaining ↔ int?
Number of requests remaining in the current rate limit window.
getter/setter pair
rateLimitReset ↔ int?
Unix timestamp when the rate limit window will reset.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setHeaders(Map<String, String> headers) → void
Populates rate limit fields from HTTP response headers.
toString() → String
A string representation of this object.
inherited

Operators

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