HTTPS/Authenticated: Difference between revisions

Content added Content deleted
(Added BaCon version.)
Line 26: Line 26:
<lang bacon>OPTION TLS TRUE
<lang bacon>OPTION TLS TRUE


CONST Connect_Timeout = 2000
website$ = "chiselapp.com"
website$ = "chiselapp.com"
username$ = "nobody"
username$ = "nobody"
Line 35: Line 34:
SEND "GET /user/bacon/repository/bacon/index HTTP/1.1\r\nHost: " & website$ & "\r\nAuthorization: Basic " & B64ENC$(username$ & ":" & password$) & "\r\n\r\n" TO connection
SEND "GET /user/bacon/repository/bacon/index HTTP/1.1\r\nHost: " & website$ & "\r\nAuthorization: Basic " & B64ENC$(username$ & ":" & password$) & "\r\n\r\n" TO connection


WHILE WAIT(connection, Connect_Timeout)
WHILE WAIT(connection, 2000)
RECEIVE data$ FROM connection
RECEIVE data$ FROM connection
total$ = total$ & data$
total$ = total$ & data$