mirror of https://github.com/flightphp/core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
351 B
13 lines
351 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
class OverwriteBodyMiddleware
|
|
{
|
|
public function after()
|
|
{
|
|
$response = Flight::response();
|
|
$response->write(str_replace('<span style="color:red; font-weight: bold;">failed</span>', '<span style="color:green; font-weight: bold;">successfully works!</span>', $response->getBody()), true);
|
|
}
|
|
}
|