Page 1 of 1

does get-url support https?

Posted: Fri Apr 28, 2006 9:16 am
by scusack
Hi all,

I have been trying ;

(get-url "http://www.foo...bar.com") which works beautifully but;

(get-url "https://www.foo...bar.com/") just seems to spin forever without returning anything. I usually have to kill newLisp (on winXP) as it stops responding.

I haven't tried it on my linux box yet, does anybody know if get-url supports https out of the box, I couldn't find anything in the help doco.

Regards, Simon Cusack.

Posted: Fri Apr 28, 2006 10:23 am
by HPW
get-url supports the HTTP GET protocol.

I do not think that it does support the secure protocol.

Posted: Fri Apr 28, 2006 12:13 pm
by Lutz
No SSL protocol support yet but you can specify a timeout in milli seconds:

Code: Select all

> (get-url "https://www.foo...bar.com/") 2000)
"ERR: timeout"
> 
because https is not implemented, newLISP will still try port 80, but you can force it to the SSL default of 443:

Code: Select all

> (get-url "https://www.foo...bar.com:443" 2000)
"ERR: invalid response from server"
> 
now it will return right away, but again these are all games because https:// support is not implemented.

As a work around use the newLISP 'exec' funtion with the 'curl' UNIX utility:

Code: Select all

(exec "curl https:// ......")
This will return all standart out from the curl utility in a list of strings to newLISP.

Lutz

Re:

Posted: Mon Feb 15, 2010 6:45 pm
by itistoday
Lutz wrote:No SSL protocol support yet
Any plans for this? Would be rather useful if get/put/post-url functions supported this.

Re: does get-url support https?

Posted: Mon Feb 15, 2010 8:55 pm
by Lutz
Most Unix systems have libcurl on it. It is possible to write a module to do SSL via https and other stuff. Until such a module exists you could use the method, Cormullion uses to post to blogspot.com:

http://newlisper.blogspot.com/2007/06/p ... sp_16.html

Then there is also the Amazon module to communicate with there ec2 data services via https:

http://www.newlisp.org/modules/various/ ... p.src.html

The module assumes you already have keys.

Re: does get-url support https?

Posted: Mon Feb 15, 2010 10:17 pm
by itistoday
Yeah I'm currently using 'curl' right now, was just wondering if there were any plans for building this into newlisp.