Skip to content

Commit

Permalink
Ignore --location flag (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexxai authored Oct 11, 2022
1 parent 6b0e39b commit 1b85da7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Commands/CurlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CurlCommand extends Command
{
protected $signature = 'shift:curl {--X|request=} {--G|get} {--H|header=*} {--d|data=*} {--data-urlencode=*} {--F|form=*} {--digest} {--basic} {--connect-timeout=} {--max-timeout=} {--retry=} {--s|silent} {--u|user=} {url}';
protected $signature = 'shift:curl {--X|request=} {--G|get} {--H|header=*} {--d|data=*} {--data-urlencode=*} {--F|form=*} {--digest} {--basic} {--connect-timeout=} {--max-timeout=} {--retry=} {--s|silent} {--u|user=} {--L|location} {url}';

protected $description = 'Convert a UNIX curl request to an HTTP Client request';

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/Console/Commands/CurlCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function curlCommandFixtures()
'Stripe query params' => ['stripe-query-params'],
'Initial connection timeout' => ['connect-timeout'],
'Entire transaction timeout' => ['max-timeout'],
'Ignore location flag' => ['ignore-location-flag'],
];
}

Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/ignore-location-flag.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl --location https://example.com
1 change: 1 addition & 0 deletions tests/fixtures/ignore-location-flag.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Http::get('https://example.com');

0 comments on commit 1b85da7

Please sign in to comment.