Simple tool to dump the raw curl command from Laravel HTTP Request.
You can pull in the package via composer:
composer require jigarakatidus/laravel-http-to-curl
The package will automatically register itself
Http::ddWithCurl()
->acceptJson()
->asForm()
->withBasicAuth('username', 'password')
->get('https://example.com/padfhj', [
'foo' => 'foobar',
'bar' => 'barfoo',
]);
Outputs
curl -H 'User-Agent: GuzzleHttp/7' -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' -H 'Host: example.com' -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -X 'GET' 'https://example.com/padfhj?foo=foobar&bar=barfoo'
Please see CHANGELOG for more information what has changed recently.
$ composer test
Pull Requests are welcome.
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.