Skip to content

Commit 79d6712

Browse files
authored
Merge pull request #37 from voytech-net/patch-1
Networking: Allow all success status code
2 parents 60cca83 + 047d1bd commit 79d6712

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/networking/ny_base_api_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class NyBaseApiService {
156156
/// You can return a different value using this callback.
157157
handleResponse<T>(Response response,
158158
{Function(Response response)? handleSuccess}) {
159-
bool wasSuccessful = response.statusCode == 200;
159+
bool wasSuccessful = response.statusCode >= 200 && response.statusCode < 300;
160160

161161
if (wasSuccessful == true && handleSuccess != null) {
162162
return handleSuccess(response);

0 commit comments

Comments
 (0)