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

Deprecate Client in favor of SyncClient #54

Closed
yazaddaruvala opened this issue Jan 31, 2017 · 5 comments
Closed

Deprecate Client in favor of SyncClient #54

yazaddaruvala opened this issue Jan 31, 2017 · 5 comments
Labels
B-rfc Blocked: Request for comments. More discussion would help move this along.
Milestone

Comments

@yazaddaruvala
Copy link

Could we move away from naming one of the clients "defacto-default"? i.e. Calling them: reqwest::AsyncClient and reqwest::Client implies that the sync client is the default and async is somehow special and warrants investigation.

Using reqwest::AsyncClient and reqwest::SyncClient would be equally ergonomic, and allocates zero preference towards either implementation.

As per our exchange on reddit, we could do the following:

#[deprecated(note = "renamed to SyncClient")]
pub type Client = SyncClient;

P.S. As long as there isn't much opposition to this idea, this change is easy enough, I'm happy to do it if needed.

@seanmonstar
Copy link
Owner

I'd be completely fine with this change, though it probably would be best to wait until there is more than just the blocking Client, otherwise the additional part of the name is just noise until then.

@seanmonstar seanmonstar modified the milestone: 1.0 May 31, 2017
@jimmycuadra
Copy link

Sean's comment on #120 makes me think it'd be a good idea to do this rename prior to 1.0 even if there is only one kind of client just so the name for the sync client won't need to change between 1.0 and 2.0. There will be more people with existing code using whatever the sync client is called then than there are now.

@seanmonstar seanmonstar added the B-rfc Blocked: Request for comments. More discussion would help move this along. label Aug 19, 2017
@knight42
Copy link
Contributor

@seanmonstar Do you have a roadmap for stablizing the async stuff?

@seanmonstar
Copy link
Owner

@knight42 part of the issue is that futures and tokio are unstable, so that's the first blocker to being able to stabilize the async API in reqwest.

repi pushed a commit to EmbarkStudios/reqwest that referenced this issue Dec 20, 2019
@seanmonstar
Copy link
Owner

The default reqwest::Client is now async, with the "sync" client moved to reqwest::blocking::Client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-rfc Blocked: Request for comments. More discussion would help move this along.
Projects
None yet
Development

No branches or pull requests

4 participants