Skip to content

Commit e9c6ba3

Browse files
authored
Add more common curl options (#1)
1 parent 5bfbcf6 commit e9c6ba3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/Console/Commands/CurlCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CurlCommand extends Command
88
{
9-
protected $signature = 'curl {--X|request=GET} {--H|header=*} {--d|data=*} {--F|form=*} {url}';
9+
protected $signature = 'curl {--X|request=GET} {--H|header=*} {--d|data=*} {--F|form=*} {--digest} {--basic} {--connect-timeout=} {--retry=} {--s|silent} {--u|user=} {url}';
1010

1111
protected $description = 'Parse UNIX curl command';
1212

@@ -18,6 +18,12 @@ public function handle()
1818
'headers' => $this->option('header'),
1919
'data' => $this->option('data'),
2020
'fields' => $this->option('form'),
21+
'digest' => $this->option('digest'),
22+
'basic' => $this->option('basic'),
23+
'timeout' => $this->option('connect-timeout'),
24+
'retry' => $this->option('retry'),
25+
'silent' => $this->option('silent'),
26+
'user' => $this->option('user'),
2127
// TODO: map more options...
2228
];
2329

0 commit comments

Comments
 (0)