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

Provide a requests session to Uploader [Feature Request] #77

Open
peterroelants opened this issue Jan 24, 2023 · 3 comments
Open

Provide a requests session to Uploader [Feature Request] #77

peterroelants opened this issue Jan 24, 2023 · 3 comments

Comments

@peterroelants
Copy link

It would make the library more flexible if the Uploader could be given a requests Session object which it uses to make all requests.

Custom requests sessions can be used for many things. For example, I use them myself to capture all 401 Unauthorized errors when my tokens are expired, make sure I'm re-authenticated and repeat the request. I've seen others use them to fix a URL base or adding custom headers.

Would tus-py-client maintainers be open to providing the ability to initialize an Uploader with a custom requests.Session object to enable use cases like this?

@peterroelants
Copy link
Author

Maybe it is not clear from the initial comment, but I would be willing to spend time myself implementing the feature, if you think it would be a good idea.

@Acconut
Copy link
Member

Acconut commented Feb 6, 2023

Sounds good! It will be great if you could open a PR for this!

@SpecLad
Copy link

SpecLad commented Mar 29, 2023

It would be handy if there was a way to provide a custom HTTP stack, like in tus-js-client.

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

3 participants