derniercri / snatch

A simple, fast and interruptable download accelerator, written in Rust
MIT License
676 stars 37 forks source link

[#57] Add authorization prompts for Basic Authorization #58

Closed daveallie closed 7 years ago

daveallie commented 7 years ago

Fixes #57

For Basic Auth:

snatch https://httpbin.org/basic-auth/user/passwd -d
# [DEBUG_MODE] version: 0.1.2
# [DEBUG_MODE] file: passwd
# [DEBUG_MODE] threads: 4
# Waiting a response from the remote server... OK !
The remote content is protected by Basic Auth.
Username: user
Password: passwd
...

For Digest Auth or other unsupported auth types:

snatch https://httpbin.org/digest-auth/qop/user/passwd -d
# [DEBUG_MODE] version: 0.1.2
# [DEBUG_MODE] file: passwd
# [DEBUG_MODE] threads: 4
# Waiting a response from the remote server... OK !
[ERROR] The remote content is protected by Digest Authorization, which is not supported!
k0pernicus commented 7 years ago

Hey! Thank you @daveallie for this great work :-) That's awesome! 👍