Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readd aiohttp.{get,post,...} shortcuts #3427

Closed
slice opened this issue Dec 4, 2018 · 6 comments
Closed

Readd aiohttp.{get,post,...} shortcuts #3427

slice opened this issue Dec 4, 2018 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement outdated wontfix

Comments

@slice
Copy link

slice commented Dec 4, 2018

having these shortcuts in the requests library is very useful. they feel natural. having them in aiohttp would be even better. 😄

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #1403 ([QUESTION] aiohttp.ClientSession.request('GET') issue), #2224 (aiohttp.TCPConnector()), #469 (how to get the post data), #161 (aiohttp can't send files by POST request correct), and #1593 (Drop aiohttp.get(), aiohttp.options(), aiohttp.head(), aiohttp.post(), aiohttp.put(), aiohttp.patch(), aiohttp.delete(), and aiohttp.ws_connect()).

@aio-libs-bot aio-libs-bot added documentation Improvements or additions to documentation enhancement labels Dec 4, 2018
@asvetlov
Copy link
Member

asvetlov commented Dec 5, 2018

I not sure should we resurrect these functions or not.
Perhaps reasons for removal are gone today but I want to think carefully about it.

Maybe aiohttp.request('GET', url) can satify your needs?

@kxepal
Copy link
Member

kxepal commented Dec 5, 2018

Main problem of those shortcuts is that they became too popular to let users forget about Session thing, which isn't much popular in requests justs because of that. And because of that there around happens questions about cookies, state preserve, performance, keep-alive and others related to the session state. I think, one line with session open isn't higher price to not think about all of this.

@webknjaz
Copy link
Member

webknjaz commented Dec 5, 2018

I'm 👎 on this: aiohttp doesn't identify just an HTTP client, I'd rather not mix different namespaces into a spaghetti soup.

@asvetlov
Copy link
Member

Looks like the decision is to reject the proposal, at least for aiohttp 4.x

@lock
Copy link

lock bot commented Jan 14, 2020

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Jan 14, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement outdated wontfix
Projects
None yet
Development

No branches or pull requests

5 participants