HTTPS/Authenticated: Difference between revisions

Rename Perl 6 -> Raku, alphabetize, minor clean-up
(→‎{{header|Visual Basic}}: Added support for TLS 1.2)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 3:
The goal of this task is to demonstrate [[HTTPS request]]s with authentication.
Implementations of this task should not use client certificates for this: that is the subject of [[Client-Authenticated HTTPS Request|another task]].
 
=={{header|AutoHotkey}}==
{{libheader|iweb}}
Line 20 ⟶ 21:
#Include iweb.ahk
#Include COM.ahk
#Include COMinvokeDeep.ahk</lang>
 
=={{header|C}}==
{{libheader|libcurl}}
Line 45 ⟶ 47:
return EXIT_SUCCESS;
}</lang>
 
=={{header|C sharp|C#}}==
{{works with|C sharp|3.0}}
Line 69 ⟶ 72:
}
</lang>
 
=={{header|Clojure}}==
{{libheader|clj-http}}
Line 245 ⟶ 249:
end
</lang>
 
 
=={{header|Kotlin}}==
Line 346 ⟶ 349:
'.persistent' => 'y', # tick checkbox
});</lang>
 
=={{header|Perl 6}}==
{{works with|Rakudo|2017.09}}
Used here to connect to my local wireless router to a page that is password protected. Obviously not going to be generally publicly accessible but should be easily adaptable to other sites / devices.
 
<lang perl6>use HTTP::UserAgent;
 
my $username = 'username'; # my username
my $password = 'password'; # my password
my $address = 'http://192.168.1.1/Status_Router.asp'; # my local wireless router
 
my $ua = HTTP::UserAgent.new;
$ua.auth( $username, $password );
my $response = $ua.get: $address;
say $response.is-success ?? $response.content !! $response.status-line;</lang>
 
=={{header|Phix}}==
Line 447 ⟶ 435:
(displayln l))))
</lang>
 
=={{header|Perl 6Raku}}==
(formerly Perl 6)
{{works with|Rakudo|2017.09}}
Used here to connect to my local wireless router to a page that is password protected. Obviously not going to be generally publicly accessible but should be easily adaptable to other sites / devices.
 
<lang perl6>use HTTP::UserAgent;
 
my $username = 'username'; # my username
my $password = 'password'; # my password
my $address = 'http://192.168.1.1/Status_Router.asp'; # my local wireless router
 
my $ua = HTTP::UserAgent.new;
$ua.auth( $username, $password );
my $response = $ua.get: $address;
say $response.is-success ?? $response.content !! $response.status-line;</lang>
 
=={{header|Ruby}}==
Line 519 ⟶ 523:
 
}</lang>
 
=={{header|Sidef}}==
<lang ruby>require('WWW::Mechanize')
Line 554 ⟶ 559:
set data [http::data $token]
http::cleanup $token</lang>
 
 
=={{header|Visual Basic}}==
10,327

edits