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

Use custom event loop for AsyncClient requests #216

Closed
viniciusd opened this issue Aug 15, 2019 · 2 comments
Closed

Use custom event loop for AsyncClient requests #216

viniciusd opened this issue Aug 15, 2019 · 2 comments

Comments

@viniciusd
Copy link

I am currently using an async web framework and I would like to perform some http requests from the server.

That means I would need to use the same event loop I already use for my server. How can I change httpx's loop?

@viniciusd
Copy link
Author

Let it go, I was still using the sync client (Client), instead of the async one (AsyncClient)

@tomchristie
Copy link
Member

You don’t need to do anything special - AsyncClient doesn’t set any particular event loop, it’ll use whatever context you’re already in.

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

No branches or pull requests

2 participants