Updated all dependencies and prepared for PHP 8
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
namespace CloudObjects\PhpMAE;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Slim\Http\Response;
|
||||
use Slim\Psr7\Response;
|
||||
|
||||
/**
|
||||
* The JsonRPCTransport writes JsonRPC output into a Slim response.
|
||||
@@ -19,10 +19,11 @@ class JsonRPCTransport {
|
||||
public function reply($data) {
|
||||
if (is_a($data, ResponseInterface::class))
|
||||
$this->response = $data->withHeader('C-PhpMae-Passthru', '1');
|
||||
else
|
||||
else {
|
||||
$this->response = (new Response(200))
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->write($data);
|
||||
->withHeader('Content-Type', 'application/json');
|
||||
$this->response->getBody()->write($data);
|
||||
}
|
||||
}
|
||||
|
||||
public function receive() {
|
||||
|
||||
Reference in New Issue
Block a user