refactor: formatting action revert

This commit is contained in:
Manas Hejmadi
2025-06-22 21:28:43 +05:30
parent f20b3d8bb6
commit 1b64d05fc5
17 changed files with 179 additions and 204 deletions

View File

@@ -126,8 +126,7 @@ multipart/form-data; boundary={{boundary}}''';
Uri? uri = rec.$1;
var method = requestModel.method;
var requestBody = requestModel.body;
if (requestModel.bodyContentType == ContentType.json &&
requestBody?.isNotEmpty == true) {
if (requestModel.bodyContentType == ContentType.json && requestBody?.isNotEmpty == true){
result += kJsonImport;
}
if (uri != null) {
@@ -137,7 +136,8 @@ multipart/form-data; boundary={{boundary}}''';
'isFormDataRequest': requestModel.hasFormData,
"method": requestModel.method.name.toLowerCase()
});
if (kMethodsWithBody.contains(method) && requestBody != null) {
var contentLength = utf8.encode(requestBody).length;
if (contentLength > 0) {