From c089501073983b6d96d9ec08fcb66f49745e21db Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 30 Jan 2021 20:41:39 -0500 Subject: [PATCH] add response status code to headers.json --- archivebox/util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/archivebox/util.py b/archivebox/util.py index 5530ab45..a96950bb 100644 --- a/archivebox/util.py +++ b/archivebox/util.py @@ -200,7 +200,13 @@ def get_headers(url: str, timeout: int=None) -> str: stream=True ) - return pyjson.dumps(dict(response.headers), indent=4) + return pyjson.dumps( + { + 'Status-Code': response.status_code, + **dict(response.headers), + }, + indent=4, + ) @enforce_types