mirror of
https://github.com/mskatoni/ni-mail.git
synced 2026-09-03 22:47:38 +08:00
13 lines
250 B
Python
13 lines
250 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
import requests
|
|
|
|
|
|
def get_response_details(response: requests.Response) -> Any:
|
|
try:
|
|
return response.json()
|
|
except Exception:
|
|
return response.text or response.reason
|