ok property

bool ok

A boolean indicating whether the response was successful (status in the range 200 – 299) or not.

MDN Reference

Implementation

bool get ok => status >= 200 && status < 300;