fix headers Elapsed timedelta is not a JSON-serializable

This commit is contained in:
Nick Sweeting 2024-08-26 20:15:22 -07:00
parent 917af4b1d7
commit 6ffa710bb3
No known key found for this signature in database

View file

@ -273,8 +273,8 @@ def get_headers(url: str, timeout: int=None) -> str:
{
'URL': url,
'Status-Code': response.status_code,
'Elapsed': response.elapsed,
'Encoding': response.encoding,
'Elapsed': response.elapsed.total_seconds()*1000,
'Encoding': str(response.encoding),
'Apparent-Encoding': response.apparent_encoding,
**dict(response.headers),
},