diff --git a/src/requtests/parsed_request.py b/src/requtests/parsed_request.py index d998da8..ed7e00c 100644 --- a/src/requtests/parsed_request.py +++ b/src/requtests/parsed_request.py @@ -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)