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:
- Page for paginated responses
- TooManyRequestsException for rate limit errors
- Implementers
- AccountDataResponse
- AccountResponse
- AnchorTransactionResponse
- AnchorTransactionsResponse
- AssetResponse
- ChallengeResponse
- ClaimableBalanceResponse
- CustomerFileResponse
- DepositResponse
- EffectResponse
- ExtraInfo
- FeatureFlags
- FederationResponse
- FeeChargedResponse
- FeeEndpointInfo
- FeeResponse
- FeeStatsResponse
- GetCustomerFilesResponse
- GetCustomerInfoField
- GetCustomerInfoProvidedField
- GetCustomerInfoResponse
- HealthResponse
- InfoResponse
- LedgerResponse
- LiquidityPoolPriceResponse
- LiquidityPoolResponse
- LiquidityPoolTradesResponse
- MaxFeeResponse
- OfferResponse
- OperationResponse
- OrderBookResponse
- Page
- PathResponse
- PutCustomerInfoResponse
- Refund
- RefundPayment
- RootResponse
- SEP24DepositAsset
- SEP24FeeResponse
- SEP24InfoResponse
- SEP24InteractiveResponse
- SEP24Transaction
- SEP24TransactionResponse
- SEP24TransactionsResponse
- SEP24WithdrawAsset
- SEP30AccountResponse
- SEP30AccountsResponse
- SEP30SignatureResponse
- SEP38InfoResponse
- SEP38PricesResponse
- SubmitCompletedChallengeResponse
- SubmitTransactionResponse
- TradeAggregationResponse
- TradeResponse
- TransactionResponse
- WithdrawResponse
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