Returns true if code is in the range 200-299, false otherwise.
true
code
false
static bool isSuccess(int code) => 200 <= code && code < 300;