Open
Description
I tried, but i could not get it to work with this library: Is it possible to do things like sending 2 responses as server response?
// init - RoadRunner is just an example
$worker = \Spiral\RoadRunner\Worker::create();
$psrFactory = new Psr17Factory();
$psr7 = new \Spiral\RoadRunner\Http\PSR7Worker(worker : $worker,
requestFactory: $psrFactory,
streamFactory : $psrFactory,
uploadsFactory: $psrFactory);
// ... other code here. now the interesting part:
$psr7->respond(status : 103,
headers : ['Link' => ['</static/css/bootstrap.min.css>; rel=preload; as=style',
'</static/js/bootstrap.bundle.min.js>; rel=preload; as=script']],
endOfStream: false);
$psr7->respond(status : 200,
body : 'My fancy HTML that took maybe 1 second to create',
endOfStream: true);
// exceptions following and so on
endOfStream would describe that the response stream shall be closed or not (which has not been implemented yet?).
Metadata
Metadata
Assignees
Labels
No labels