maxkostinevich / artisan-ping
Make HTTP requests using Laravel Artisan.
Fund package maintenance!
maxkostinevich
v1.1.0
2022-07-20 20:43 UTC
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/contracts: ^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
README
Make HTTP requests using Laravel artisan ping:http
command.
For example:
php artisan ping:http --url=https://example.com --method=GET
or
php artisan ping:http --url=https://example.com --method=POST --headers='x-api-key=123456' --headers='another-key-name=key-value' --data='name=John Doe' --data='email=john@example.com'
Supported options
Option | Description | Default |
---|---|---|
--url | Required. URL to make the HTTP request to. | |
--method | HTTP request method (GET, POST, DELETE, PATCH) | POST |
--retry | Number of retries | 1 |
--timeout | Request timeout | 5 |
--headers | Headers to pass. Multiple values allowed. | |
--data | Data to pass. Multiple values allowed. | |
--queue | Doesn't expect any values. Whether the job should be queued. | false |
Installation
You can install the package via composer:
composer require maxkostinevich/artisan-ping
Testing
composer test
Credits
MIT License
(c) 2020 Max Kostinevich - All rights reserved.