# Implementation of common https functions
# Vlatko Kosturjak <kost@linux.hr>
# Distributed under GPL

function https_req_get(port, request)
{
    if(get_port_state(port))
    {

	 soc = open_sock_tcp(port, transport:ENCAPS_SSLv23);
	 if(soc)
	 {
	    send(socket:soc, data:string(request,"\r\n"));
	    result = http_recv(socket:soc);
	    close(soc);
	    return(result);
	 }
    }
}
