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

Make HTTP requests inside Request class #1

Merged
merged 4 commits into from
Dec 30, 2023
Merged

Make HTTP requests inside Request class #1

merged 4 commits into from
Dec 30, 2023

Conversation

acatiadroid
Copy link
Owner

Initially, I chose to design it so aiohttp.ClientSession would be preserved after each request, but this wouldn't work as it would be initialized outside of a task. I decided that it would be better practice to create the ClientSession class inside of a context manager. This would be better as it wouldn't require the user to have to .close() the ClientSession instance.

If I discover a better approach to preserving a ClientSession instance that is inside of a task I will do that instead.

@acatiadroid acatiadroid merged commit 8a3d7c0 into main Dec 30, 2023
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

Successfully merging this pull request may close these issues.

1 participant