Skip to content

Commit

Permalink
🎨 utilise default values
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed May 10, 2024
1 parent 1729b5e commit eabb0fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions aries_cloudagent/vc/ld_proofs/document_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ def download(self, url: str, options: Optional[Dict], **kwargs):
{"url": url},
code="loading document failed",
)
headers = options.get("headers")
if headers is None:
headers = {"Accept": "application/ld+json, application/json"}
headers = options.get(
"headers", {"Accept": "application/ld+json, application/json"}
)
headers["User-Agent"] = f"AriesCloudAgent/{__version__}"
response = requests.get(url, headers=headers, **kwargs)

content_type = response.headers.get("content-type")
if not content_type:
content_type = "application/octet-stream"
content_type = response.headers.get(
"content-type", "application/octet-stream"
)
doc = {
"contentType": content_type,
"contextUrl": None,
Expand Down

0 comments on commit eabb0fc

Please sign in to comment.