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

StudioClient API to reuse request session, all auth/path building logic? #24

Open
skshetry opened this issue Mar 16, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@skshetry
Copy link
Member

No description provided.

@kshitiz305
Copy link

Hey May I know a bit more about the issue ?

@skshetry
Copy link
Member Author

skshetry commented May 8, 2023

This issue is only opened for consideration. We haven't decided yet.

response = requests.post(
url,
json=body,
headers={
"Content-type": "application/json",
"Authorization": f"token {studio_token}",
},
timeout=5,
)

In post_live_metrics, we use requests.post instead of using a session, so we are not reusing a TCP connection (see requests.Session). Also, we have to pass all auth options to request.post again and again, instead of creating a Session object once with all auth options set.

@daavoo daavoo added the enhancement New feature or request label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants