The goal of this task is to demonstrate HTTPS requests with authentication.
Implementations of this task should not use client certificates for this: that is the subject of another task.

OPTION TLS TRUE
 
website$ = "website.com"
username$ = "nobody"
password$ = "ignore"
 
OPEN website$ & ":443" FOR NETWORK AS conn
SEND "GET / HTTP/1.1\r\nHost: " & website$ & "\r\nAuthorization: Basic " & B64ENC$(username$ & ":" & password$) & "\r\n\r\n" TO conn
 
WHILE WAIT(conn, 2000)
    RECEIVE data$ FROM conn
    total$ = total$ & data$
    IF INSTR(data$, "</html>") THEN BREAK
WEND
CLOSE NETWORK conn
 
PRINT total$