Skip to content

Commit b39f484

Browse files
committed
Prepare TOC to avoid name collisions with HTTP client
1 parent f3efa6b commit b39f484

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Event-driven, streaming plaintext HTTP and secure HTTPS server for [ReactPHP](ht
1010
* [Usage](#usage)
1111
* [Server](#server)
1212
* [listen()](#listen)
13-
* [Request](#request)
13+
* [Server Request](#server-request)
1414
* [Request parameters](#request-parameters)
1515
* [Query parameters](#query-parameters)
1616
* [Request body](#request-body)
@@ -71,7 +71,7 @@ processing each incoming HTTP request.
7171

7272
When a complete HTTP request has been received, it will invoke the given
7373
request handler function. This request handler function needs to be passed to
74-
the constructor and will be invoked with the respective [request](#request)
74+
the constructor and will be invoked with the respective [request](#server-request)
7575
object and expects a [response](#response) object in return:
7676

7777
```php
@@ -88,7 +88,7 @@ $server = new React\Http\Server(function (Psr\Http\Message\ServerRequestInterfac
8888

8989
Each incoming HTTP request message is always represented by the
9090
[PSR-7 `ServerRequestInterface`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface),
91-
see also following [request](#request) chapter for more details.
91+
see also following [request](#server-request) chapter for more details.
9292

9393
Each outgoing HTTP response message is always represented by the
9494
[PSR-7 `ResponseInterface`](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface),
@@ -115,7 +115,7 @@ for more details.
115115
By default, the `Server` buffers and parses the complete incoming HTTP
116116
request in memory. It will invoke the given request handler function when the
117117
complete request headers and request body has been received. This means the
118-
[request](#request) object passed to your request handler function will be
118+
[request](#server-request) object passed to your request handler function will be
119119
fully compatible with PSR-7 (http-message). This provides sane defaults for
120120
80% of the use cases and is the recommended way to use this library unless
121121
you're sure you know what you're doing.
@@ -190,7 +190,7 @@ $server = new React\Http\Server(array(
190190

191191
In this case, it will invoke the request handler function once the HTTP
192192
request headers have been received, i.e. before receiving the potentially
193-
much larger HTTP request body. This means the [request](#request) passed to
193+
much larger HTTP request body. This means the [request](#server-request) passed to
194194
your request handler function may not be fully compatible with PSR-7. This is
195195
specifically designed to help with more advanced use cases where you want to
196196
have full control over consuming the incoming HTTP request body and
@@ -246,7 +246,7 @@ $server->listen($socket);
246246

247247
See also [example #11](examples) for more details.
248248

249-
### Request
249+
### Server Request
250250

251251
As seen above, the [`Server`](#server) class is responsible for handling
252252
incoming connections and then processing each incoming HTTP request.

src/Server.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* When a complete HTTP request has been received, it will invoke the given
1919
* request handler function. This request handler function needs to be passed to
20-
* the constructor and will be invoked with the respective [request](#request)
20+
* the constructor and will be invoked with the respective [request](#server-request)
2121
* object and expects a [response](#response) object in return:
2222
*
2323
* ```php
@@ -34,7 +34,7 @@
3434
*
3535
* Each incoming HTTP request message is always represented by the
3636
* [PSR-7 `ServerRequestInterface`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface),
37-
* see also following [request](#request) chapter for more details.
37+
* see also following [request](#server-request) chapter for more details.
3838
*
3939
* Each outgoing HTTP response message is always represented by the
4040
* [PSR-7 `ResponseInterface`](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface),
@@ -61,7 +61,7 @@
6161
* By default, the `Server` buffers and parses the complete incoming HTTP
6262
* request in memory. It will invoke the given request handler function when the
6363
* complete request headers and request body has been received. This means the
64-
* [request](#request) object passed to your request handler function will be
64+
* [request](#server-request) object passed to your request handler function will be
6565
* fully compatible with PSR-7 (http-message). This provides sane defaults for
6666
* 80% of the use cases and is the recommended way to use this library unless
6767
* you're sure you know what you're doing.
@@ -136,7 +136,7 @@
136136
*
137137
* In this case, it will invoke the request handler function once the HTTP
138138
* request headers have been received, i.e. before receiving the potentially
139-
* much larger HTTP request body. This means the [request](#request) passed to
139+
* much larger HTTP request body. This means the [request](#server-request) passed to
140140
* your request handler function may not be fully compatible with PSR-7. This is
141141
* specifically designed to help with more advanced use cases where you want to
142142
* have full control over consuming the incoming HTTP request body and

0 commit comments

Comments
 (0)