Test ogdClient
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
354b18c068
commit
8c30def21a
|
@ -41,10 +41,13 @@ class StatusAction extends AbstractController
|
|||
|
||||
try {
|
||||
$response = $this->httpClient->request('POST', 'https://' . $client->getIp() . ':8000/ogAdmClient/status', [
|
||||
'verify_peer' => false,
|
||||
'verify_host' => false,
|
||||
'timeout' => 10,
|
||||
'body' => ['hola' => 'mundo']
|
||||
'verify_peer' => false, // Desactivar verificación del certificado
|
||||
'verify_host' => false, // Desactivar verificación del nombre del host
|
||||
'timeout' => 10, // Tiempo máximo de espera
|
||||
'headers' => [
|
||||
'Content-Type' => 'application/json', // Cabecera de tipo de contenido
|
||||
],
|
||||
'json' => ['hola' => 'mundo'], // Cuerpo de la solicitud como JSON
|
||||
]);
|
||||
$statusCode = $response->getStatusCode();
|
||||
$client->setStatus($statusCode === Response::HTTP_OK ? 'active' : 'off');
|
||||
|
|
Loading…
Reference in New Issue