ResponseAPI constructor
ResponseAPI(})
Constructor to initialize the API response.
code
: HTTP status code.response
: The actual response data from the API.isError
: Optional flag to indicate if the response contains an error.isCacheError
: Optional flag to indicate if the error is due to cache issues.error
: Optional field to store error details.
Implementation
ResponseAPI(this.code, this.response, {this.isError, this.isCacheError, this.error});