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

Client session method that accepts http verb as a parameter #1167

Closed
thanosexcite opened this issue Sep 14, 2016 · 2 comments
Closed

Client session method that accepts http verb as a parameter #1167

thanosexcite opened this issue Sep 14, 2016 · 2 comments
Labels
invalid This doesn't seem right outdated

Comments

@thanosexcite
Copy link
Contributor

Long story short

I'd like to create a wrapper function around the http client and a small annoyance that I'm having is that there is no method in ClientSession that accepts the http verb as a parameter. There are just .get(), .post(), etc methods as far as I can see. So, to make my wrapper, I need to have multiple if statements that will choose the correct method from ClientSession, depending on the passed http verb string.

Is it possible to have something like a .request() that can accept the verb as a param? There is one like that for the Basic API of the client, but not in the session one.

Expected behaviour

A ClientSession.request(self, method, url, _, data=None, *_kwargs) function should exist that accepts the verb as a param, but other than that, it should be the same as the other ClientSession verb methods.

Actual behaviour

There is no such method.

Your environment

aiohttp==0.22.5
Linux

@asvetlov asvetlov added the invalid This doesn't seem right label Sep 14, 2016
@asvetlov
Copy link
Member

`ClientSession.request exists for a year and half.

@lock
Copy link

lock bot commented Oct 29, 2019

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 Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right outdated
Projects
None yet
Development

No branches or pull requests

2 participants