diff --git a/sanic/utils.py b/sanic/utils.py index 1943652c..644a2a22 100644 --- a/sanic/utils.py +++ b/sanic/utils.py @@ -9,7 +9,8 @@ async def local_request(method, uri, cookies=None, *args, **kwargs): url = 'http://{host}:{port}{uri}'.format(host=HOST, port=PORT, uri=uri) log.info(url) async with aiohttp.ClientSession(cookies=cookies) as session: - async with getattr(session, method)(url, *args, **kwargs) as response: + async with getattr( + session, method.lower())(url, *args, **kwargs) as response: response.text = await response.text() response.body = await response.read() return response