diff --git a/lib/src/utils/http_helper.dart b/lib/src/utils/http_helper.dart index 9333f1b80c..35cfe691bf 100644 --- a/lib/src/utils/http_helper.dart +++ b/lib/src/utils/http_helper.dart @@ -287,11 +287,7 @@ class HttpHelper { headers.addAll({'Authorization': token}); } } - if (addCookieToHeader) { - if (user?.cookie == null) { - throw Exception('A cookie must be set before calling this method'); - } - + if (addCookieToHeader && user?.cookie != null) { headers['Cookie'] = user!.cookie!; }