Get Request is used when Post Request is Used. #4980
-
🐞 Describe the bug Aiohttp uses the get request instead of the post request. 💡 To Reproduce
import aiohttp
async with aiohttp.ClientSession() as session:
async with session.post(f'http://api.trello.com/1/cards') as r:
return await r.text()
💡 Expected behavior The request was done via a push request. 📋 Logs/tracebacks None 📋 Your version of the Python $ python3 --version
Python 3.8.0 📋 Your version of the aiohttp/yarl/multidict distributions $ python3 -m pip show aiohttp
Name: aiohttp
Version: 3.6.2
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author: Nikolay Kim
Author-email: fafhrd91@gmail.com
License: Apache 2
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Requires: yarl, async-timeout, attrs, multidict, chardet
Required-by: discord.py, dblpy $ python3 -m pip show multidict
Name: multidict
Version: 4.5.2
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Requires:
Required-by: yarl, aiohttp $ python3 -m pip show yarl
Name: yarl
Version: 1.3.0
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Requires: multidict, idna
Required-by: aiohttp 📋 Additional context Using it in a discord bot vs using reqbin The bot is able to properly post to other sites, but not api.trello.com |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
POST to 'http://api.trello.com/1/cards' returns a 301:
This behaviour seems expected. it is a duplicate: #3082 According to rfc2616:
|
Beta Was this translation helpful? Give feedback.
-
Oh ok, thanks for the help! |
Beta Was this translation helpful? Give feedback.
POST to 'http://api.trello.com/1/cards' returns a 301:
This behaviour seems expected.
it is a duplicate: #3082
According to rfc2616: