https://github.com/maxkostinevich/artisan-ping
Make HTTP requests from console using Laravel Artisan.
https://github.com/maxkostinevich/artisan-ping
artisan artisan-command laravel laravel-package
Last synced: about 1 year ago
JSON representation
Make HTTP requests from console using Laravel Artisan.
- Host: GitHub
- URL: https://github.com/maxkostinevich/artisan-ping
- Owner: maxkostinevich
- License: mit
- Created: 2021-01-09T21:23:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T20:43:57.000Z (almost 4 years ago)
- Last Synced: 2025-04-15T02:06:40.418Z (about 1 year ago)
- Topics: artisan, artisan-command, laravel, laravel-package
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Artisan Ping
[](https://packagist.org/packages/maxkostinevich/artisan-ping)
[](https://github.com/maxkostinevich/artisan-ping/actions?query=workflow%3ATests+branch%3Amain)
[](https://packagist.org/packages/maxkostinevich/artisan-ping)
---

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:
```bash
composer require maxkostinevich/artisan-ping
```
## Testing
```bash
composer test
```
## Credits
- [Max Kostinevich](https://github.com/maxkostinevich)
- [All Contributors](../../contributors)
---
### [MIT License](https://opensource.org/licenses/MIT)
(c) 2020 [Max Kostinevich](https://maxkostinevich.com) - All rights reserved.