File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,20 @@ static function (ServerRequestInterface $request) use ($browser): PromiseInterfa
2222 $ requests = [];
2323
2424 foreach (explode (', ' , getenv ('URLS ' )) as $ url ) {
25- $ requests [] = $ browser ->get ($ url . $ request ->getUri ()->getPath () . '? ' . $ request ->getUri ()->getQuery ());
25+ $ requests [] = $ browser ->get (
26+ $ url . $ request ->getUri ()->getPath () . '? ' . $ request ->getUri ()->getQuery ()
27+ )->then (
28+ static fn (ResponseInterface $ response ): string => (string )$ response ->getBody (),
29+ static fn (): string => '' ,
30+ );
2631 }
2732
28- return all ($ requests )->then (function (array $ responses ) {
33+ return all ($ requests )->then (function (array $ strings ) {
2934 $ body = '' ;
3035
31- /** @var ResponseInterface $response */
32- foreach ($ responses as $ response ) {
33- $ body .= ( string ) $ response -> getBody () . PHP_EOL ;
36+ /** @var */
37+ foreach ($ strings as $ string ) {
38+ $ body .= $ string ;
3439 }
3540
3641 return new Response (200 , [], $ body );
You can’t perform that action at this time.
0 commit comments