Closed varna9000 closed 3 years ago
How do you implement the response in other async code?
when I do: res=requests.get("http://xxx.xxx.xxx.xxx") print(res.content) I get AttributeError: 'generator' object has no attribute 'content'
res=requests.get("http://xxx.xxx.xxx.xxx") print(res.content)
AttributeError: 'generator' object has no attribute 'content'
Should I yeild the result somehow?
you need to use "await", so: res = await requests.get("http://xxx.xxx.xxx.xxx")
How do you implement the response in other async code?
when I do:
res=requests.get("http://xxx.xxx.xxx.xxx") print(res.content)
I getAttributeError: 'generator' object has no attribute 'content'
Should I yeild the result somehow?