fix HttpClient fetch_nodeinfo and get
This commit is contained in:
parent
d5b9053f71
commit
dcca1eb0dc
|
@ -103,10 +103,6 @@ class HttpClient:
|
||||||
return
|
return
|
||||||
|
|
||||||
if loads:
|
if loads:
|
||||||
if issubclass(loads, DotDict):
|
|
||||||
message = await resp.json(loads=loads.new_from_json)
|
|
||||||
|
|
||||||
else:
|
|
||||||
message = await resp.json(loads=loads)
|
message = await resp.json(loads=loads)
|
||||||
|
|
||||||
elif resp.content_type == MIMETYPES['activity']:
|
elif resp.content_type == MIMETYPES['activity']:
|
||||||
|
@ -189,4 +185,4 @@ class HttpClient:
|
||||||
logging.verbose(f'Failed to fetch nodeinfo url for domain: {domain}')
|
logging.verbose(f'Failed to fetch nodeinfo url for domain: {domain}')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return await request(nodeinfo_url, loads=Nodeinfo.new_from_json) or False
|
return await self.get(nodeinfo_url, loads=Nodeinfo.new_from_json) or False
|
||||||
|
|
Loading…
Reference in a new issue