Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

ClientBuilder #9

Open
jpochyla opened this issue Feb 1, 2021 · 2 comments
Open

ClientBuilder #9

jpochyla opened this issue Feb 1, 2021 · 2 comments

Comments

@jpochyla
Copy link
Contributor

jpochyla commented Feb 1, 2021

Hi! I'd like to have an option to customize the reqwest::Client for explicit proxy setup, and thought that it might be a good time to add a builder for the Client fields. And while I'm at it, changing Client::credentials to be somehow optional (either through an Option or turning it into enum) would be great as well, as I'm currently just passing empty strings for the credential values and it seems wrong :) Unfortunately it's not backwards-compatible change. What do you think?

@SabrinaJewson
Copy link
Owner

I like the ClientBuilder idea! I'll implement that.

I don't want to make credentials an Option or an enum because for most use cases, it's not optional. I'm starting to think that a TokenSource trait would be the best option.

@jpochyla
Copy link
Contributor Author

jpochyla commented Feb 1, 2021

I like the ClientBuilder idea! I'll implement that.

I'm actually on it already! I'll push a writable PR.

I don't want to make credentials an Option or an enum because for most use cases, it's not optional. I'm starting to think that a TokenSource trait would be the best option.

👍

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

No branches or pull requests

2 participants