From 6bd7aeebe3ae5230857571376c70587728ef96e5 Mon Sep 17 00:00:00 2001 From: Aashutosh soni Date: Tue, 19 Mar 2024 17:10:25 +0530 Subject: [PATCH] update: bug fixes. --- lib/codegen/php/guzzle.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/codegen/php/guzzle.dart b/lib/codegen/php/guzzle.dart index c0e5562e..48f077d5 100644 --- a/lib/codegen/php/guzzle.dart +++ b/lib/codegen/php/guzzle.dart @@ -68,7 +68,7 @@ echo \$res->getBody(); [ 'name' => '${field['name']}', 'contents' => '${field['value']}' - ],'''; + ],\n'''; }).join(), }); result += renderedMultiPartBody; @@ -86,7 +86,7 @@ echo \$res->getBody(); } var jsonString = ''; m.forEach((key, value) { - jsonString += "\t\t\t\t'$key' => '$value', \n"; + jsonString += "\t\t\t\t'$key' => '$value',\n"; }); jsonString = jsonString.substring( 0, jsonString.length - 2); // Removing trailing comma and space @@ -104,7 +104,7 @@ echo \$res->getBody(); } var headersString = ''; m.forEach((key, value) { - headersString += "\t\t\t\t'$key' => '$value', \n"; + headersString += "\t\t\t\t'$key' => '$value',\n"; }); if (requestModel.hasFormData) { m['Content-Type'] = 'multipart/form-data'; @@ -148,8 +148,8 @@ echo \$res->getBody(); "url": stripUrlParams(requestModel.url), "method": harJson["method"].toLowerCase(), "queryParams": - harJson["queryString"].isNotEmpty ? ". \$queryParamsStr," : "", - "headers": harJson["headers"].isNotEmpty ? " \$headers," : "", + harJson["queryString"].isNotEmpty ? ". \$queryParamsStr" : "", + "headers": harJson["headers"].isNotEmpty ? ", \$headers," : "", "body": getRequestBody(harJson), });