HTTPS: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 518: | Line 518: | ||
llList2String(lBody, 16)= <link rel="shortcut icon" href="http://a.fsdn.com/con/img/sftheme/favicon.ico"> |
llList2String(lBody, 16)= <link rel="shortcut icon" href="http://a.fsdn.com/con/img/sftheme/favicon.ico"> |
||
... ... ... ... ... ... ... ... ... ... ... ... ... ...</pre> |
... ... ... ... ... ... ... ... ... ... ... ... ... ...</pre> |
||
=={{header|Lua}}== |
|||
{{works with|lua 5.1 - 5.3}} |
|||
{{libheader|lua-http}} |
|||
<lang lua> |
|||
local request = require('http.request') |
|||
local headers, stream = request.new_from_uri("https://sourceforge.net/"):go() |
|||
local body = stream:get_body_as_string() |
|||
local status = headers:get(':status') |
|||
io.write(string.format('Status: %d\nBody: %s\n', status, body) |
|||
</lang> |
|||
HTTPS requests can be also done with the much smaller library [[LuaSec]] but it currently don't support redirects, which is why I used [[lua-http]] in this example. |
|||
=={{header|Maple}}== |
=={{header|Maple}}== |