isSuccess property

bool get isSuccess

Check if response indicates success (2xx status codes).

Returns true for status codes 200-299, which indicate successful request processing.

Example:

expect(response.isSuccess, true); // 200, 201, 204, etc.

Implementation

bool get isSuccess => statusCode >= 200 && statusCode < 300;