Skip to content

Commit

Permalink
add response status code to headers.json
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate committed Jan 31, 2021
1 parent b9b1c3d commit c089501
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion archivebox/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c089501

Please sign in to comment.