A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
15
Task/HTTPS-Authenticated/Tcl/https-authenticated.tcl
Normal file
15
Task/HTTPS-Authenticated/Tcl/https-authenticated.tcl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package require http
|
||||
package require tls
|
||||
http::register https 443 ::tls::socket
|
||||
|
||||
# Generate the authentication
|
||||
set user theUser
|
||||
set pass thePassword
|
||||
dict set auth Authenticate "Basic [binary encode base64 ${user}:${pass}]"
|
||||
|
||||
# Make a secure authenticated connection
|
||||
set token [http::geturl https://secure.example.com/ -headers $auth]
|
||||
|
||||
# Now as for conventional use of the “http” package
|
||||
set data [http::data $token]
|
||||
http::cleanup $token
|
||||
Loading…
Add table
Add a link
Reference in a new issue