Skip to content

Commit

Permalink
Reword note about parsed body
Browse files Browse the repository at this point in the history
Refs #1
  • Loading branch information
shadowhand committed Nov 11, 2023
1 parent e50fdbd commit 89a77b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ There are three factory methods for `JsonData`:
- `fromRequest()` creates data from PSR-7 (server) requests
- `fromResponse()` creates data from PSR-7 responses

Be aware that `ServerRequestInterface` input will default to using `getParsedBody()`
as the data source. To ignore the parsed body, call the factory this way:
Be aware when calling `JsonData::fromRequest()` with a `ServerRequestInterface` object,
the value of `getParsedBody()` will be used by default. To disable this behavior, use:

```php
$data = JsonData::fromRequest($request, useParsedBody: false);
Expand Down

0 comments on commit 89a77b6

Please sign in to comment.