23 lines
630 B
PHP
23 lines
630 B
PHP
![]() |
<?php
|
||
|
namespace Incoviba\Command;
|
||
|
|
||
|
use Symfony\Component\Console;
|
||
|
use Incoviba\Common\Alias;
|
||
|
|
||
|
#[Console\Attribute\AsCommand(
|
||
|
name: 'external:services',
|
||
|
description: 'Check external services',
|
||
|
)]
|
||
|
class ExternalServices extends Alias\Command
|
||
|
{
|
||
|
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
|
||
|
{
|
||
|
$url = '/api/external/services/check';
|
||
|
$output->writeln("GET {$url}");
|
||
|
$response = $this->client->get($url);
|
||
|
$output->writeln("Response Code: {$response->getStatusCode()}");
|
||
|
|
||
|
return Console\Command\Command::SUCCESS;
|
||
|
}
|
||
|
}
|