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

Either remove or increase async #39

Closed
blyxxyz opened this issue Feb 8, 2021 · 2 comments · Fixed by #41
Closed

Either remove or increase async #39

blyxxyz opened this issue Feb 8, 2021 · 2 comments · Fixed by #41

Comments

@blyxxyz
Copy link
Collaborator

blyxxyz commented Feb 8, 2021

ht uses async, but it uses it inconsistently and I'm not sure that it needs it.

Is it likely that it will start doing multiple requests at a time in the future? If so, then blocking APIs like std::fs should be avoided. If not, then maybe reqwest's blocking API would be easier to use.

@ducaale
Copy link
Owner

ducaale commented Feb 8, 2021

reqwest's blocking API is indeed simpler and ht was initially using that. Unfortunately, it does not offer an API for incrementally fetching a streaming response.

@blyxxyz
Copy link
Collaborator Author

blyxxyz commented Feb 8, 2021

It supports that through io::Read.

I'm working on an implementation. It adds some interesting possibilities. For example, you can wrap a ProgressBar around a reader.

blyxxyz added a commit to blyxxyz/xh that referenced this issue Feb 8, 2021
This also

- Reworks the printing system, making binary data detection and
  trailing newlines more consistent

- Removes some obsolete dependencies from Cargo.toml

Resolves ducaale#39.
blyxxyz added a commit to blyxxyz/xh that referenced this issue Feb 9, 2021
This also

- Reworks the printing system, making binary data detection and
  trailing newlines more consistent

- Removes some obsolete dependencies from Cargo.toml

Resolves ducaale#39.
blyxxyz added a commit to blyxxyz/xh that referenced this issue Feb 10, 2021
This also

- Reworks the printing system, making binary data detection and
  trailing newlines more consistent

- Removes some obsolete dependencies from Cargo.toml

Resolves ducaale#39.
@ducaale ducaale closed this as completed Feb 28, 2021
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 a pull request may close this issue.

2 participants