You are here

public function HealthCheckController::buildResponse in Health Check Url 8

Same name and namespace in other branches
  1. 8.3 src/Controller/HealthCheckController.php \Drupal\health_check_url\Controller\HealthCheckController::buildResponse()
  2. 8.2 src/Controller/HealthCheckController.php \Drupal\health_check_url\Controller\HealthCheckController::buildResponse()

Build response.

Return value

\Symfony\Component\HttpFoundation\Response Response.

1 call to HealthCheckController::buildResponse()
HealthCheckController::healthCheckUrl in src/Controller/HealthCheckController.php
Timestamp health check.

File

src/Controller/HealthCheckController.php, line 51

Class

HealthCheckController
Controller for route that returns health check url type.

Namespace

Drupal\health_check_url\Controller

Code

public function buildResponse($string) {
  $response = new Response();
  $response->headers
    ->set('Content-Type', 'text/plain');
  $response
    ->setContent($string);
  return $response;
}