diff --git a/packages/better_networking/lib/models/http_request_model.dart b/packages/better_networking/lib/models/http_request_model.dart index 3443e3d6..51caf361 100644 --- a/packages/better_networking/lib/models/http_request_model.dart +++ b/packages/better_networking/lib/models/http_request_model.dart @@ -47,6 +47,10 @@ class HttpRequestModel with _$HttpRequestModel { bool get hasTextContentType => bodyContentType == ContentType.text; int get contentLength => utf8.encode(body ?? "").length; bool get hasBody => hasJsonData || hasTextData || hasFormData; + bool get hasAnyBody => + (hasJsonContentType && contentLength > 0) || + (hasTextContentType && contentLength > 0) || + (hasFormDataContentType && formDataMapList.isNotEmpty); bool get hasJsonData => kMethodsWithBody.contains(method) && hasJsonContentType &&