Skip to content

Commit

Permalink
Include the CannotParseBodyAsJSON behaviour in json's docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
DevL committed Mar 20, 2024
1 parent 8da4afc commit d74b0b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/requtests/parsed_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def headers(self) -> Dict[str, str]:
def json(self) -> Any:
"""
The body of the prepared request, parsed as JSON.
Raises a CannotParseBodyAsJSON error if the body is not valid JSON.
"""
try:
return json.loads(self.prepared_request.body)
Expand Down

0 comments on commit d74b0b6

Please sign in to comment.