-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add initial code #1
base: main
Are you sure you want to change the base?
Conversation
* add initial code * remove test pypi * exit publish if not on main * add test pypi * install stubs * fix dependency instllation * naming of ci
proxy: httpx.Proxy | None = None, | ||
) -> None: | ||
with httpx.stream('GET', url, follow_redirects=True, proxy=proxy) as response: | ||
total = int(response.headers['Content-Length']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the transport is using http/1.1 and the transfer-encoding is chunked, there is no content-length - case needs to be handled
PROXY = ProxyType() | ||
|
||
|
||
def _download_to_stream( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't this use the download_to_stream function defined in _download? It seems like this should only exist once and progress can be controlled via a callback.
No description provided.