Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

18-asyncio/charfinder/http_charfinder.py 'Request' object has no Attribute 'GET' #31

Open
ghost opened this issue Feb 15, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 15, 2019

the 18-asyncio-py3.7 folder doesn't have this file.
but this file doesn't work in aiohttp3.5.4 with Python3.7.2
the Request object has no attribute 'GET', use query instead.

def home(request):
    try:
        query = request.GET.get('query', '').strip()
    except AttributeError:
        query = request.query.get('query', '').strip()
    print('Query: {!r}'.format(query))
@wangzil88
Copy link

still not work in py3.97, should delete 'charset=UTF-8' in 'CONTENT_TYPE = 'text/html; charset=UTF-8'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant