Pass errors parameter in async_request function

This commit is contained in:
Davte
2020-02-12 15:34:54 +01:00
parent f73f438d32
commit 61fe8e0591
2 changed files with 3 additions and 3 deletions

View File

@@ -161,7 +161,7 @@ async def async_post(url, mode='html', **kwargs):
)
async def async_request(url, type='get', mode='json', encoding=None,
async def async_request(url, type='get', mode='json', encoding=None, errors='strict',
**kwargs):
"""Make an async html request.
@@ -185,7 +185,7 @@ async def async_request(url, type='get', mode='json', encoding=None,
else s.post(url, timeout=30, data=kwargs)
) as r:
if mode in ['html', 'json', 'string']:
result = await r.text(encoding=encoding)
result = await r.text(encoding=encoding, errors=errors)
else:
result = await r.read()
if encoding is not None: