-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from jameshilliard/HTTPDigestAuth
HTTP Digest authentication support
- Loading branch information
Showing
8 changed files
with
711 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from twisted.internet.task import react | ||
from _utils import print_response | ||
|
||
import treq | ||
from treq.auth import HTTPDigestAuth | ||
|
||
|
||
def main(reactor, *args): | ||
d = treq.get( | ||
'http://httpbin.org/digest-auth/auth/treq/treq', | ||
auth=HTTPDigestAuth('treq', 'treq') | ||
) | ||
d.addCallback(print_response) | ||
return d | ||
|
||
react(main, []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.