HTTPS/Authenticated: Difference between revisions
Content added Content deleted
Line 323: | Line 323: | ||
my $response = $ua.get: $address; |
my $response = $ua.get: $address; |
||
say $response.is-success ?? $response.content !! $response.status-line;</lang> |
say $response.is-success ?? $response.content !! $response.status-line;</lang> |
||
=={{header|Phix}}== |
|||
{{libheader|libcurl}} |
|||
Exactly the same as the [[HTTP#Phix]] task. |
|||
You can of course use curl_easy_setopt(curl,CURLOPT_USERPWD,"user:password") rather than embed that in the url. |
|||
<lang Phix>include builtins\libcurl.e |
|||
curl_global_init() |
|||
atom curl = curl_easy_init() |
|||
curl_easy_setopt(curl, CURLOPT_URL, "https://user:password@example.com/") |
|||
object res = curl_easy_perform_ex(curl) |
|||
curl_easy_cleanup(curl) |
|||
curl_global_cleanup() |
|||
puts(1,res)</lang> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |