Download the PHP package jigarakatidus/laravel-http-to-curl without Composer
On this page you can find all versions of the php package jigarakatidus/laravel-http-to-curl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jigarakatidus/laravel-http-to-curl
More information about jigarakatidus/laravel-http-to-curl
Files in jigarakatidus/laravel-http-to-curl
Package laravel-http-to-curl
Short Description Extended Http to dump and die with Curl command
License MIT
Homepage https://github.com/jigarakatidus/laravel-http-to-curl
Informations about the package laravel-http-to-curl
Laravel HTTP to Curl
This package has two use-cases:
- Simple dump and die with curl command for local development for troubleshooting the http request.
- Enable logging curl command for each request in the logs.
Installation
You can pull in the package via composer:
The package will automatically register itself
Usage
Basic GET Request
Outputs
GET Request with Query Parameters
Outputs
POST Request with JSON Payload
Outputs
Automatic Request Logging
To enable the automatic logging of curl command for each request, configure these options directly through environment variables:
HTTP_TO_CURL_LOGGING: Enable/disable logging (defaults to false)HTTP_TO_CURL_LOG_LEVEL: Set log level (defaults to "debug")HTTP_TO_CURL_LOG_CHANNEL: Select log channel (defaults to "stack")
Optionally, you can publish the configuration file using the following command:
This will create a config/http-to-curl.php file where you can customize the logging behavior.
Logging Example
When you enable logging by setting HTTP_TO_CURL_LOGGING=true in your environment, all HTTP requests will be automatically logged. For example, if your application makes this request:
This cURL command will be automatically logged to your configured log channel:
This is useful for debugging API calls in both development and production environments.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Pull Requests are welcome.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Credits
- Jigar Dhulla
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-http-to-curl with dependencies
illuminate/support Version ^8.71|^9.0|^10.0|^11.0|^12.0|^13.0
jigarakatidus/command-line-generator Version ^1.0.0