Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jigar-dhulla/laravel-http-to-curl
Laravel HTTP Request to Curl Command
https://github.com/jigar-dhulla/laravel-http-to-curl
converter curl http http-request laravel
Last synced: 25 days ago
JSON representation
Laravel HTTP Request to Curl Command
- Host: GitHub
- URL: https://github.com/jigar-dhulla/laravel-http-to-curl
- Owner: jigar-dhulla
- License: mit
- Created: 2022-10-14T21:25:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T17:51:18.000Z (3 months ago)
- Last Synced: 2024-12-07T17:05:17.334Z (about 1 month ago)
- Topics: converter, curl, http, http-request, laravel
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel HTTP to Curl
Simple tool to dump the raw curl command from Laravel HTTP Request.
## Installation
You can pull in the package via composer:
``` bash
composer require jigarakatidus/laravel-http-to-curl
```The package will automatically register itself
## Usage
```php
Http::ddWithCurl()
->acceptJson()
->asForm()
->withBasicAuth('username', 'password')
->get('https://example.com/padfhj', [
'foo' => 'foobar',
'bar' => 'barfoo',
]);
```Outputs
```bash
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](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ composer test
```## Contributing
Pull Requests are welcome.
## Security
If you've found a bug regarding security please mail [[email protected]](mailto:[email protected]) instead of using the issue tracker.
## Credits
- [Jigar Dhulla](https://github.com/jigarakatidus)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.