jigarakatidus / laravel-http-to-curl
Extended Http to dump and die with Curl command
Installs: 5 116
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 1
Open Issues: 1
Requires
- php: ^8.0
- illuminate/support: ^8.71|^9.0|^10.0|^11.0
- jigarakatidus/command-line-generator: ^1.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.12
- mockery/mockery: ^1.4.2
- orchestra/testbench: ^7.11
- phpunit/phpunit: ^9.4.4
This package is auto-updated.
Last update: 2024-04-19 17:40:41 UTC
README
Simple tool to dump the raw curl command from Laravel HTTP Request.
Installation
You can pull in the package via composer:
composer require jigarakatidus/laravel-http-to-curl
The package will automatically register itself
Usage
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'
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Pull Requests are welcome.
Security
If you've found a bug regarding security please mail jigar.tidus@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.