Skip to content

Commit 990c940

Browse files
committed
Update HTTP server example for reactphp/http v1.6.0
1 parent ff23a0a commit 990c940

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

theme/homepage.html.twig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@
4242
{% markdown %}
4343
```php
4444
$http = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
45-
return new React\Http\Message\Response(
46-
200,
47-
array(
48-
'Content-Type' => 'text/plain'
49-
),
45+
return React\Http\Message\Response::plaintext(
5046
"Hello World!\n"
5147
);
5248
});

0 commit comments

Comments
 (0)