<lang erlang>
|escript ./req.erl https://sourceforge.net/
</lang>
=={{header|Fortran}}==
There is no such network library for communicating with a HTTPS server in fortran. Use appropriate tools (eg. simple node.js snippet)
<lang fortran>
program https_example
implicit none
character (len=:), allocatable :: code
character (len=:), allocatable :: command
logical:: waitForProcess
! execute Node.js code
code = "var https = require('https'); &
https.get('https://sourceforge.net/', function(res) {&
console.log('statusCode: ', res.statusCode);&
console.log('Is authorized:' + res.socket.authorized);&
console.log(res.socket.getPeerCertificate());&
res.on('data', function(d) {process.stdout.write(d);});});"
command = 'node -e "' // code // '"'
call execute_command_line (command, wait=waitForProcess)
end program https_example
</lang>
|