Skip to content

Commit

Permalink
Merge pull request #400 from pavog/patch-2
Browse files Browse the repository at this point in the history
Update example 63 to support v1.0.0+
  • Loading branch information
jsor authored Jan 26, 2021
2 parents 4e4a6b5 + 161550b commit 538a8f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/63-server-streaming-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// Note how this example uses the advanced `StreamingRequestMiddleware` to allow streaming
// the incoming HTTP request. This very simple example merely counts the size
// of the streaming body, it does not otherwise buffer its contents in memory.
$server = new React\Http\Server(array(
$server = new React\Http\Server(
$loop,
new React\Http\Middleware\StreamingRequestMiddleware(),
function (Psr\Http\Message\ServerRequestInterface $request) {
$body = $request->getBody();
Expand Down Expand Up @@ -44,7 +45,7 @@ function (Psr\Http\Message\ServerRequestInterface $request) {
});
});
}
));
);

$server->on('error', 'printf');

Expand Down

0 comments on commit 538a8f4

Please sign in to comment.