Skip to content

Commit 39a0b1c

Browse files
committed
Fix lint + tests
1 parent 690331a commit 39a0b1c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Console/Commands/CurlCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Shift\CurlConverter\Console\Commands;
44

5-
use Shift\CurlConverter\Support\HttpCall;
65
use Illuminate\Console\Command;
6+
use Shift\CurlConverter\Support\HttpCall;
77

88
class CurlCommand extends Command
99
{

src/Models/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function create(array $data): self
6262
$request->multipartFormData = true;
6363
}
6464

65-
if (!empty($request->data) && $request->method === 'GET') {
65+
if ($request->method === 'GET' && (!empty($data['data']) || !empty($data['fields']))) {
6666
$request->method = 'POST';
6767
}
6868

src/Support/HttpCall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Shift\CurlConverter\Support;
44

5-
use Shift\CurlConverter\Models\Request;
65
use Illuminate\Support\Str;
6+
use Shift\CurlConverter\Models\Request;
77
use Symfony\Component\VarExporter\VarExporter;
88

99
class HttpCall

0 commit comments

Comments
 (0)