(self)
| 27 | self._json_data = json_data |
| 28 | |
| 29 | def json(self): |
| 30 | if self._json_data is not None: |
| 31 | return self._json_data |
| 32 | try: |
| 33 | return json.loads(self.text) |
| 34 | except Exception: |
| 35 | raise ValueError("Invalid JSON") |
| 36 | |
| 37 | def raise_for_status(self): |
| 38 | if 400 <= self.status_code: |
no test coverage detected