We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7d45c5 commit 9969b67Copy full SHA for 9969b67
README.md
@@ -103,6 +103,20 @@ $http->on('error', function (Exception $e) {
103
});
104
```
105
106
+An `error` event will be emitted for the `Request` if the validation of the body data fails.
107
+This can be e.g. invalid chunked decoded data or an unexpected `end` event.
108
+
109
+```php
110
+$http->on('request', function (Request $request, Response $response) {
111
+ $request->on('error', function (\Exception $error) {
112
+ echo $error->getMessage();
113
+ });
114
+});
115
+```
116
117
+Such an error will `pause` the connection instead of closing it. A response message
118
+can still be sent.
119
120
### Request
121
122
The `Request` class is responsible for streaming the incoming request body
0 commit comments