Skip to content

Commit 2aec8c9

Browse files
committed
Update HTTP server example for reactphp/http v1.6.0
1 parent 099e242 commit 2aec8c9

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ components to create async network clients/servers and more.
2424

2525
```php
2626
$server = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
27-
return new React\Http\Message\Response(
28-
200,
29-
array(
30-
'Content-Type' => 'text/plain'
31-
),
27+
return React\Http\Message\Response::plaintext(
3228
"Hello World!\n"
3329
);
3430
});

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"react/cache": "^1.0",
1313
"react/dns": "^1.8",
1414
"react/event-loop": "^1.2",
15-
"react/http": "^1.5",
15+
"react/http": "^1.6",
1616
"react/promise": "^2.1 || ^1.2",
1717
"react/promise-stream": "^1.1.1",
1818
"react/promise-timer": "^1.7",

0 commit comments

Comments
 (0)